problem with live function
Posted
by
Dirty Bird Design
on Stack Overflow
See other posts from Stack Overflow
or by Dirty Bird Design
Published on 2011-02-28T15:19:55Z
Indexed on
2011/02/28
15:24 UTC
Read the original article
Hit count: 188
jQuery
I had this working to spec, until the specs changed. This function is now brought in via ajax .load. Easy enough to bring it in and I have all my other functions on the page that is brought in working in the parent page except this one:
$("#CME").hide();
$(function() {
$("#CME1, #CMEQL, #CBT1, #CBTQL, #NYM1, #CMX1").live("change", function(){
var checkBoxes = $("#CME1, #CMEQL, #CBT1, #CBTQL, #NYM1, #CMX1").filter(":not(:checked)");
if(checkBoxes.length == 0){
$("#CME").slideDown("fast");
} else {
$("#CME").slideUp("fast");
}
});
the div "#CME" is not hidden and the .live('change', function () { isn't working. I have other similar .live functions that are working and structured the same. How do I bind the initial $(function() with .live and why isn't the .hide() working? });//CME
© Stack Overflow or respective owner