Wednesday, 19 September 2018

jquery chosen fails on regenerated content

I am generating the contents on my <select> via ajax. The first time the <option>s load via ajax - all is good and chosen is triggered correctly, even if I had pre-loaded content in that <select>. but if i generate the <option>s a second time - i cannot get chosen to fire.

Here is a jsfiddle to show you what i mean: https://jsfiddle.net/kneidels/vrp0gz1c/

Hit GO the first time - everything is fine. But hit it again, and the reverts back to the old non-chosen style.

Can someone help me "reset" the plugin so that it fires correctly EACH time?

Using Chosen Version: 1.87



from jquery chosen fails on regenerated content

No comments:

Post a Comment