Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions jquery.asmselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
$select.change(selectChangeEvent)
.click(selectClickEvent);


$original.change(originalChangeEvent)
.wrap($container).before($select).before($ol);

Expand Down Expand Up @@ -168,7 +169,10 @@
buildingSelect = true;

// add a first option to be the home option / default selectLabel
$select.prepend("<option value=''>" + $original.attr('title') + "</option>");
if ($original.attr('title')) {

$select.prepend("<option value=''>" + $original.attr('title') + "</option>");
}

$original.children("option").each(function(n) {

Expand Down Expand Up @@ -228,7 +232,7 @@
// we apply a class that reproduces the disabled look in other browsers

$option.addClass(options.optionDisabledClass)
removeAttr("selected")
.removeAttr("selected")
.attr("disabled", true);

if(options.hideWhenAdded) $option.hide();
Expand Down