This is my first attempt at using jquery, so perhaps this is way
off...

I'm utilizing the following code to add rows to my table:

$("input:[EMAIL PROTECTED]'Add_Row']").click(function () {

$('<tbody>').appendTo("#tblFormulary").html("<tr><td><img src='images/
on.gif'></td></tr>");

This works very well, but now I need to utilize "toggle" to swap the
src.  Because this is added after the original DOM is loaded, I've
been looking into livequery to handle this - but no success:

     $("img")
        .livequery('toggle', function(event){
         $(this).attr("src","images/btnReactivate.gif")
     }, function(event) {
         $(this).attr("src","images/btnDeactivate.gif")
     });

My hope is to swap the src back and forth for the image contained in
each new row.

Thanks for the help!

Reply via email to