I want to have jQuery show div id=\'business\' only if \'business use\' is selected in the dropdown box.
This is my code:
You need to either put your code at the end of the page or wrap it in a document ready call, otherwise you're trying to execute code on elements that don't yet exist. Also, you can reduce your code to:
$('#purpose').on('change', function () {
$("#business").css('display', (this.value == '1') ? 'block' : 'none');
});
jsFiddle example