Skip to content

Commit

Permalink
Updating Bug #28 - Programmatically changing the value of the select …
Browse files Browse the repository at this point in the history
…element
  • Loading branch information
gfranko committed Oct 13, 2012
1 parent 5fc7064 commit e3f6282
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/javascripts/jquery.selectBoxIt.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@
var text,
currentOption = self.list.find('li[data-val="' + self.originalElem.value + '"]');

// If there is a dropdown option with the smae value as the original select box element
// If there is a dropdown option with the same value as the original select box element
if(currentOption.length) {

self.currentFocus = currentOption.attr("id");
Expand All @@ -1110,17 +1110,6 @@

}

// If there is not a dropdown option with the same value as the original select box element
else {

// The currently selected option text
text = $(self.originalElem).find("option:selected").text();

// Sets the new dropdown list text to the value of the original dropdown list selected option text (or value if there is no text)
self.divText.text(text || self.originalElem.value).attr("data-val", self.originalElem.value);

}

}

if(self.listItems.eq(self.currentFocus).find("i").attr("class")) {
Expand Down

0 comments on commit e3f6282

Please sign in to comment.