jQuery Show Content Based on Select Option

[javascript]
jQuery(function () {
jQuery(‘#select_ID’).change(function () {
var selected = $(this).find(‘:selected’).val();
jQuery(".item_to_hide").hide();
jQuery(‘#’ + selected).show();
}).change();
});
[/javascript]

Leave a Reply