I am following a jQuery tutorial and its code seems to work fine with jQuery 1.4.3, but I need it to work with jQuery 1.8.3.
jsfiddle: http://jsfiddle.net/auBbz/
Problem: When I switched the version of jQuery used to version 1.8.3, after replacing className with class, the selectbox that shows in the Result pane does not have any text inside <div class="selectBox"></div>.
jsfiddle after making the change: http://jsfiddle.net/auBbz/1/
What other changes did I miss out?
One of the more major changes between 1.4 and 1.6 was with
attr()method and introduction ofprop()method to be used for properties that aren’t really attributes.selectedIndexwould be considered a property not an attribute. Your code is returningundefinedforattr('selectedIndex'). Useprop('selectedIndex')insteadDEMO : http://jsfiddle.net/auBbz/3/