Permalink
Browse files

Update jquery.dropdown.js

1 parent dec4fba commit a08df5ccb7bdb50e1c8c3eb84a3f7a966f33d533 @arielbottero arielbottero committed Nov 2, 2015
Showing with 4 additions and 2 deletions.
  1. +4 −2 jquery.dropdown.js
View
@@ -295,7 +295,9 @@
// Behavior for single select
if (!multi) {
// Unselect options except the one that will be selected
- if($target[0].tagName.toUpperCase()=="LI") {selectOptions.not($target).removeClass("selected"); }
+ if ($target.is("li")) {
+ selectOptions.not($target).removeClass("selected");
+ }
// Select the selected option
$target.addClass("selected");
// Set the value to the native select
@@ -349,7 +351,7 @@
// Ss it selected?
if ($this.prop("selected")) {
$option.attr("selected", true);
- $option.addClass("selected");
+ $option.addClass("selected");
}
// Append option to our dropdown

0 comments on commit a08df5c

Please sign in to comment.