jquery .load taking too long after successive calls

Posted by user560079 on Stack Overflow See other posts from Stack Overflow or by user560079
Published on 2012-06-18T21:13:47Z Indexed on 2012/06/18 21:16 UTC
Read the original article Hit count: 229

Filed under:
|
|

I have the following jquery script:

<script>
$(function(){   
$('#menu-change-div').on('click', 'a.change-content', function(e){     
e.preventDefault()   
$("#content").load($(this).attr("href"));     
});  
});
</script>

It dynamically loads content into my content div depending on which link they clicked in the menu. The problem I am having is when I click multiple links, say 5-10 in a row, the load time goes from instantly to taking 10 seconds or more to not even loading. Is there something in my function that is causing this? Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about load