That's because your JS is only adding the onclick handler when the document
is ready.  Later, when you replace those links that you added the onclick
handler to, they are replaced, and therefore no longer have the old onclick
handlers.  You will need to trigger the addition of your onclick handler
again.  (see target.appendJavascript("..."))

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Apr 9, 2010 at 1:12 PM, tubin gen <fachh...@gmail.com> wrote:

> I   added this jquery code   to my page.
>
>    $(document).ready(function(){
>     $("a.showHidePrograms").click(
>     function () {
>       var $div= $(this).parent().next("div");
>       if($div.attr("class") == 'hide'){
>            $div.attr("class","show");
>       }else{
>          $div.attr("class","hide");
>       }
>     }
>     );
>    });
>
>  inside my html I have a table this contains  anchor tag with
> class showHidePrograms.
>  onclick of this anchor tag the function gets called everything is fine.
>
> This page also has some ajaxLinks on click of this link  I repaint the
> table, after this    when I click on anchor tag the jquery script is not
> called ,
> does repainting somehow hides this anchor from jquery ?
>

Reply via email to