I have a dropdown, and I want to run a jQuery function when-ever a differnet item is selected. This is my current script:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$('select[name=dropdown]').change(function() {
$('#result').html($(this).val());
});
</script>
<div id='result'></div>
<select name="dropdown">
<option value="1">option 1</option>
<option value="2">option 2</option>
</select>
How do i get this to work?