//activate selected row in table
jQuery('.activatebutton').click(function(){
var tb = jQuery(this).attr('title');
//initialize to false as no selected row
var sel = false;
//get each checkbox in a table
var ch = jQuery('#'+tb).find('tbody input[type=checkbox]');
//check if there is/are selected row in table
ch.each(function(){
if(jQuery(this).is(':checked')) {
//set to true if there is/are selected row
sel = true;
jQuery(this).parents('tr').fadeOut(function(){
/*
THIS IS THE LINE THAT IS NOT WORKING BELOW!!!! I want to send VALUE ID to delete.php
*/
jQuery.get('delete.php', { id:this.id });
//remove row when animation is finished
jQuery(this).remove();
});
}
});
问问题
212 次