These lines in jquery making me bad:
var selectBoxContainer = $('<div>',{width: select.outerWidth(), className:'styledSelect', html:'<div class="selectBox"></div>'});
var dropDown = $('<ul>',{className:'dropDown'});
It should set the class attribute "class="styledselect" in the output, but the attribute's name is "classname":
<div classname="styledSelect">
<ul classname="dropDown" style="display: none;">...</ul>
</div>
when I change it simply to {class:'dropDown'}
ist works in firefox, but not in other browsers.
help please...
Try:
{ "class": "dropDown" }
or add .addClass("drowDown")
to the end.
Use
{'class': 'dropDown'}
class
is a future reserved word in JavaScript, so you must specify it as a string inside object literals for some browsers, notably IE 8 and lower.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With