Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  22] [ 1]  / answers: 1 / hits: 37685  / 11 Years ago, sat, february 8, 2014, 12:00:00

Good day, How can I properly close a select2 dropdown via jquery or javascript??



for now Im using select2-dropdown.toggle() to close it,



but I noticed that It will simply hide the list and the select2 box is still being highlighted enter



I want to lost focus it or something like that just to close it properly and be able to come up with a result like this one enter.



by the way the screen shots are dark because those select2 boxes are under a bootstrap modal that would come up whenever I press enter.



Any advice would really be appreciated! Thanks in advance


More From » jquery

 Answers
13

this one works for me $(#select2-drop-mask).click();


[#72646] Friday, February 7, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jamie

Total Points: 257
Total Questions: 102
Total Answers: 95

Location: Bonaire
Member since Wed, Mar 29, 2023
1 Year ago
;