I need to call a function after page load, but only once, page elements are loaded by Ajax, so $(document).Ready() does not work. Now I’m using $(document).AjaxSuccess() but it is not rational because the function is called too often, but I needed only once
I need to call a function after page load, but only once, page elements
Share
You should call the function in the callback function of your Ajax function.
For example if you’re using jQuery Load, you should do: