I'd like jQuery to detect when the option with the id trade_buy_max
is selected.
I've tried the following, but it doesn't seem to work.
Any ideas?
This works... Listen for the change event on the select box to fire and once it does then just pull the id attribute of the selected option.
$("#type").change(function(){
var id = $(this).find("option:selected").attr("id");
switch (id){
case "trade_buy_max":
// do something here
break;
}
});