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
BootstrapCSSHTMLJavaScriptjQuery

Avatar of undefined
Last Comment
Eric Nemchik

8/22/2022 - Mon
Scott Fell

> 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
Eric Nemchik

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Julian Hansen

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
Eric Nemchik

This seems to resolve the issue. There are differences in the library versions that cause the inconsistency in the original code's behavior.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck