I have a simple jQuery function as
$('.button').click(function(){
$("#target").slideToggle().load('http://page');
});
By slideToggle
behavior, every click cause a slide, but the problem is that it will load url
again too.
How can I limit the load()
function to be performed only once, but slideToggle()
on every click. In other words, how to prevent load()
(only load, not the entire function) in the subsequent clicks?