JKG Posted August 31, 2011 Share Posted August 31, 2011 hey, i have a series of check boxes, i have it sorted for checking, im just trying to make it do the opposite when unchecked! this isnt working on the if not checked side. both of the functions do work, just not in this setting. any thoughts would be much appreciated! thanks!!! if($('.tws-box input').is(":checked")){ $(function() { var id = $(this).attr("id"); $('.tws-box input').click(function() { $.post("<?php echo $html_dir . $scripts_dir . 'ajax/contact_ids_delete.php'; ?>",{idsToDelete:id},function(data) { $('.results').html(data); }); }); }); } else { $(function() { $('.tws-box input').click(updateTextArea); updateTextArea(); }); } Quote Link to comment https://forums.phpfreaks.com/topic/246135-if-checked-do-this-if-not-do-that-jquery/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.