jquery .load() function only gets called once
Posted
by
user1288099
on Stack Overflow
See other posts from Stack Overflow
or by user1288099
Published on 2012-03-23T11:05:07Z
Indexed on
2012/03/23
11:29 UTC
Read the original article
Hit count: 149
the html
<div class="stackwrapper" id="user1"></div>
<div class="stackwrapper" id="user2"></div>
<div class="userdrawings"></div>
the javascript
$('.stackwrapper').click(function(e){
var id=$(this).attr('id');
$('.userdrawings').load('loadSession.php?user='+id).fadeIn("slow");
});
Somehow it only works at once, only at the first click on stackwrapper, when I click on the second one, the function is not triggered again.
© Stack Overflow or respective owner