I know it is quite a common issue, but even with research I was not able to understand what goes wrong in my call to document.ready() Javascript function.
For some reason, it gets called twice, even when I don’t execute anything else than an alert.
As I said in the title, I am using jQuery, and figured something could come from $(function(){}), so I removed any execution in there as well. Nothing changes, document.ready() is still called twice.
What can be the origin of this issue? How to troubleshoot/solve it?
Thanks in advance!
Here’s the code I’ve tried :
$(function(){
//$( "#tabs" ).tabs();
});
$(document).ready(function() {
//getTableEntity("organisation", "getentitytable", "#testtable");
//standardDataTable('#tableOrga');
alert("document.ready");
});
Edit : I know I’m using the same function twice. Putting everything in one function doesn’t solve the problem.
Do you use a template-Engine such smarty or .net or something else? It could be that there is a double script source for jquery. Then there are side effects.