I have a select list with values \'all\' and \'custom\'. On select with value \'custom\' a div with class \'resources\' should appear, and if the value is \'all\' it should
$("#privileges").change(function(){ var select= $(this).val(); if(select=='custom'){ //some code } });
or
var select=$('#privileges :selected').val() if(select=='custom'){ //some code }