Skip to content

Commit

Permalink
Chrome fix to make sure we always are able to grab a selected option.
Browse files Browse the repository at this point in the history
  • Loading branch information
merbjedi committed Feb 25, 2010
1 parent 3a806aa commit 6cebe4b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions jquery.uniform.js
Expand Up @@ -92,9 +92,13 @@ Enjoy!
if(options.useID){
divTag.attr("id", options.idPrefix+"-"+elem.attr("id"));
}

spanTag.html(elem.find(":selected").text());


var selected = elem.find(":selected:first");
if(selected.length == 0){
selected = elem.find("option:first");
}
spanTag.html(selected.text());

elem.css('opacity', 0);
elem.wrap(divTag);
elem.before(spanTag);
Expand Down

0 comments on commit 6cebe4b

Please sign in to comment.