Thanks a ton, your solution is working great. The final code I'm using is below. $(document).ready(function(){
//an add button at the bottom of my tblFormulary table ads a new row, incrementing the input fields name and ids $("input:[EMAIL PROTECTED]'Add_Row']").click(function () { var myRecordCount = $("#tblFormulary tbody tr").size()+1 $('<tbody>').appendTo("#tblFormulary").html("<tr><td><input name='"+ myRecordCount +"rowID' id='"+ myRecordCount +"rowID' type='hidden' value='"+ myRecordCount +"'><input name='"+myRecordCount +"useThisRecord' id='"+ myRecordCount +"useThisRecord' type='hidden' value='Yes'><a href='#'><img class='active_toggle' border='0' name='"+myRecordCount +"btnActivate' id='"+myRecordCount +"btnActivate' src='images/btnDeactivate.gif'></a></td><td><input name='"+ myRecordCount +"Name_Strength' id='"+ myRecordCount +"Name_Strength' type='text' value=''></td><td><input name='"+ myRecordCount +"SIG' id='"+ myRecordCount +"SIG' type='text' value=''></td><td><input name='Quantity' id='"+ myRecordCount +"Quantity' type='text' value=''></td><td><input name='"+ myRecordCount +"Refills' id='"+ myRecordCount +"Refills' type='text' value=''></td></tr>"); //bind to the newly created images created by add row $("img.active_toggle").livequery(init,destroy); }); //deactivate-activate toggle handler var destroy = function() { $(this).unbind('toggle').unbind('click'); }; var init = function() { $(this).toggle(function(e){ var $this = $(this); $(this).attr("src","images/btnReactivate.gif") $(this).parents('tr:eq(0)').css('background-image', 'url(images/ deactivated_SlantBar.jpg)'); $(this).parents('tr:eq(0)').find('input').css("border- width","0px").attr("readonly","true"); }, function(e) { $(this).parents('tr:eq(0)').css('background-image', ''); $(this).parents('tr:eq(0)').find('input').css("border- width","1px").removeAttr("readonly"); $(this).attr("src","images/btnDeactivate.gif") }); }; //bind to images that were loaded when page was loaded $("img.active_toggle").livequery(init,destroy); }); On Jan 23, 5:08 am, h0tzen <[EMAIL PROTECTED]> wrote: > read the livequery-docs, there is no signature like > livequery(String type, Function handler, Function anotherHandler) > > quick & untested: > > var init = function() { > $(this).toggle(function(e) { > $(this).attr("src","images/btnReactivate.gif")}, function(e) { > > $(this).attr("src","images/btnDeactivate.gif") > > }); > }; > > var destroy = function() { > $(this).unbind('toggle').unbind('click'); > > }; > > $("img").livequery(init, destroy); > > hth, kai