How to show/hide content based on select onchange using jQuery

If you want a select drop down option to show/hide specific div contents, here’s a simple solution using jQuery. $(document).ready(function(){ $("#select_id").change(function(){ var test = $(this).val(); if(test==’option value to show’) { $("#container").show("slow"); }else { $("#container").hide("slow"); } }); HTML code will look something like this. <div id="container"> Hey! here are your hidden contents. </div> Cheers!