option:selected - html()/text() is null in Safari & Chro
Project can be seen here,
http://aamg.smcing.com/products/fxr-mens-adrenaline-jacket
I'm running the following script to grab the text from the selected options in the drop down boxes. The problem is when you select a product color, the chosen product size is coming back null int Chrome and Safari (works in FF and IE)
If you make a change to the size box, then the product size returns properly.
I need to get the option being shown regardless if the user touches the drop downs.
-
$("select#color").change(function() {
var currentIndex
currentIndex = "size" + $("select#color[value]").val()
$("#"+currentIndex).show()
$("#"+currentIndex).siblings().hide()
productNote = "Color: " + $("select#color option:selected").html() + ", Size: " + $("#" + currentIndex + " option:selected").html()
alert(productNote)
});
Thanks for the help,
Brad