I have the requirement to produce a really nice-looking drop-down form element based on an HTML select. The best (most appropriate for this project) I’ve been able to find is this one: http://demo.tutorialzine.com/2010/11/better-select-jquery-css3/select-jquery.html. It works by replacing the HTML elements with custom mark-up which is nicely styled and animated. All good.
However, it doesn’t work with the newer versions of jQuery. I’ve set up a fiddle http://jsfiddle.net/VTTyu/ which shows what it does. It works great with jQuery 1.4.4 but when you change it to use jQuery 1.7.2 (which I’m using elsewhere in my project) it stops working.
I know I can read through the release notes of each jQuery release for the past 18 months and try to establish what might have changed to cause this, but I wondered if anyone more experienced could identify the problem?
Any pointers/suggestions would be much appreciated, thanks folks.
EDIT: with some more testing on fiddle it seems to work with jQuery up to 1.5.2, but any version after that and the drop-down button just disappears from the page.
Replace (twice)
classNamewith'class'(quotes too) and see the magic happen.