Is it possible to make a function strictly only callable once? As in, once per time the page is loaded.
I'm using :
$( document ).ready( function() {
$( "#targetDiv" ).load( "http://www.example.com #specificElementID" );
});
I'm finding that if you click all over the page lots of times whilst it's loading, that it sometimes seems to load twice? Is there a way of preventing this action from happening more than once? I was under the impression that having $( document ).ready( function() { ...
would help me to achieve this. But it does not appear to be the case!