Link to home
Start Free TrialLog in
Avatar of shruti A
shruti A

asked on

code is not working not getting what to do

I am referring your  code i.e http://www.marcorpsa.com/ee/t1161.html but it's not working for me means not adding into drop-down please help me .... what should I do
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

> what should I do

Recreate it on your own site with fake data and post a link to the page for us to look at.
ASKER CERTIFIED SOLUTION
Avatar of Eric Nemchik
Eric Nemchik
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The issue with the sample was due to a change in the way that bootstrap-select plugin renders its markup. In the version that the sample was based on the <select> was placed outside the .bootstrap-select container. With the later version of the plugin the <select> was relocated inside the .bootstrap-select container. To accommodate the change requires changing this line
var p=$(t).closest('.bootstrap-select').prev();

Open in new window

To
var p=$(t).closest('.bootstrap-select').find('select');

Open in new window


I have updated the sample.

Thanks to Eric for pointing out the issue and suggesting a solution
This seems to resolve the issue. There are differences in the library versions that cause the inconsistency in the original code's behavior.