I\'ve got a page with a variable number of elements (which explains why I\'m using event delegation here). When the user changes the selected opt
Idea that might help:
$(document).ready(function() {
$('#container select[name="mySelectName"]').change(function(e) {
var s = $(e.target);
if (s.val()=='1') //hide/show something;
});
});
If you are using AJAX, try live() function:
$(document).ready(function() {
$('#container select[name="mySelectName"]').live('change', function(e) {
var s = $(e.target);
if (s.val()=='1') //hide/show something;
});
});