//The ready event occurs after the HTML document has been loaded $(document).ready(function () { }); // The onload event occurs later, when all content (e.g. images) also has been loaded. $(window).load(function() { SearchAction(); // used to autoload a grid });