Hi,

I wrote a jQuery code to display a link in the side bar (like the ones
such as "About this group" shown in the right pane of this page)
through AJAX.
Then I want the click event on the link to be taken care of by
jQuery.
But that event is not captured by jQuery.
How can I capture the event?

The code looks something like this (class name etc. has been changed
for the purpose of posting here):

jQuery(document).ready( function($) {

    jQuery( ".class-name-for-element-for-ajax" ).click( function() {
        ...
        jQuery.get( jQuery(this).attr("href"), { some_variable:
some_value }, null, "script" );
        return false;
   }

   jQuery( ".class-name-for-link-in-right-pane" ).click( function() {
        jQuery.get( jQuery(this).attr("href"), null, null, "script" );
        return false;
   }

});

The element for the first click event above exists but the the one for
the second doesn't exist when a page is first displayed.
When the first element is clicked, as a result of AJAX call, the
second element is displayed.
Then when the second element is clicked, the second click event above
is not captured by jQuery above.

Thank you in advance.

Tadatoshi

Reply via email to