Show Content Based on Select Option

Submitted by:Andery Smith

Date added:12 May, 2014

Category:jQuery

jQuery code example to show content based on select option.

Tags: show content , jquery content show

Code Snippet:

jQuery(function () {
jQuery('#select_ID').change(function () {
var selected = $(this).find(':selected').val();
jQuery(".item_to_hide").hide();
jQuery('#' + selected).show();
}).change();
});
 
 

Comments