Jump to content

if checked do this, if not do that... jQuery


JKG

Recommended Posts

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();
}); 
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.