you have to make sure the DOM element (i.e. your close button) is
available when you define your "close()" function. or use the
livequery plugin. or use event delegation.

On Mon, Dec 29, 2008 at 4:09 AM, amnesia440 <spaceman...@gmail.com> wrote:
>
> Hello.
>
> I am trying to load a login form into the #login_pop_box div via
> the .load function:
>
> $('#login_pop_box').hide();
>          $('a#login_pop_box_on').click(function() {
>                $('#login_pop_box').load('ajax/login_global');
>                $('#login_pop_box').fadeIn('400');
>          });
>          $('a#login_pop_box_off').click(function() {
>                $(this).parents('#login_pop_box').fadeOut('300');
>          })
>
> This works, but when I try to cose the window with a link contained in
> the content I just loaded, nothing happens.
>
> Here is the link i the loaded content:
> <a href="#" id="login_pop_box_off">[x]close</a>
>

Reply via email to