Permalink
Showing
with
4 additions
and
1 deletion.
-
+4
−1
jquery.dropdown.js
|
@@ -297,7 +297,9 @@ |
|
|
// Behavior for single select
|
|
|
if (!multi) {
|
|
|
// Unselect options except the one that will be selected
|
|
|
- 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
|
|
@@ -351,6 +353,7 @@ |
|
|
// Ss it selected?
|
|
|
if ($this.prop("selected")) {
|
|
|
$option.attr("selected", true);
|
|
|
+ $option.addClass("selected");
|
|
|
}
|
|
|
|
|
|
// Append option to our dropdown
|
|
|
0 comments on commit
9d36644