Execute jquery ajax after page is loaded
ajax, asp.net-mvc, asp.net-mvc-4, javascript, jquery
Solution
$(document).ready(function() { /* Ajax call */ });
Or if you prefer shorter notation, just use:
$(function() { /* Ajax call */ });
Problem
To describe scenario that I want to make: When user goes to stackoverflow.com the page is loaded fast. And in the top right corner there are 2 menu items (inbox, achievements). I have the same looking page. But as I need more time to load this items that cause that page load slower. How can I execute `JQuery ajax function` to get those data after all data on page are already loaded. Basicaly: Load whole page > execute jquery and display results when you get them.