[jQuery] Hiding a div with content loaded via .load function
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>