We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In jquery.easydropdown.js around line 322 there is this command:
index = self.$select.find('option[value='+index+']').index() - 1;
The .index() function, however, returns a zero-based index, so results returned by that function are off by one.
You should be able to replicate this bug by creating some structure like this:
<select class="dropdown" id="my-foo-select"> <option value="first">First item</option> <option value="second">Second item</option> <option value="third">Third item</option> </select> <script type="text/javascript"> $(function() { $("select#my-foo-select").easyDropDown("select", "third"); }); </script>
Notice how the script should select the third item, but in reality the second item will get selected.
The text was updated successfully, but these errors were encountered:
Fixing issue #28, an off-by-one error.
a50cc9d
No branches or pull requests
In jquery.easydropdown.js around line 322 there is this command:
The .index() function, however, returns a zero-based index, so results returned by that function are off by one.
You should be able to replicate this bug by creating some structure like this:
Notice how the script should select the third item, but in reality the second item will get selected.
The text was updated successfully, but these errors were encountered: