Check/Uncheck All With jQuery Posted: 14 Nov 2010 07:24 AM PST $(function() { $(‘#checkall’).live(‘change’, function() { var chk = $(this).attr(‘checked’); $(this).parent().find(‘li input[type=”checkbox”]’).attr(‘checked’, chk); }); });
Category Archives: javascript
find events assosiated with elements
This will alert all functions associated to a given element… var elem = document.getElementById(‘ELEMENT_ID_HERE’); var str = ”; for(var prop in elem) { if(typeof elem[prop] == ‘function’) str += prop + ‘\n’; } alert(str);