Hi guys i using this jquery to show a div when i select a option
$("#select1").change(function(){
if ($(this).val() == "2" ) {
$("#hide1").fadeIn("fast");
} else {
$("#hide1").fadeOut("fast");
}
});
});
But i have a problem when i load the page get results from database, the option on select return SELECTED and the div only shows if i change the option..
can samebody help what i neeed to do to solve this?
explain again: get the val() from select and show the div without change the option… sorry for my english..
thanks
You can trigger the change after you bind it.