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
You can clean up the HTML by dropping the onClick and removing the IDs from the options.
HTML:
Privileges: All Custom resources
And your JavaScript could simply do this:
$('#privileges').on('change', function() { if($(this).val() === 'all') { $('.resources').hide(); } else { $('.resources').show(); } });