$.domLoaded( main_function )
Parameters
Load - Nedil JS
Nedil JS functionalities can be used safely once DOM is loaded in the browser. In general all functionalties in a page can be grouped in a single function or a set of functions and executed after the DOM load event is triggered. To do that, "$.domLoaded()" function is used to call the loader function. In older browsers, page load event will be used to call the loader function.
Example 1
JS
Example 2
$.domLoaded(function() { // your code goes here });
JS
Example 3
function main() { // your code goes here } // Triggered after the DOM is loaded $.domLoaded(main);
JS
function main1() { // your code for module main1 goes here } function main2() { // your code for module main2 goes here } // Triggered after the DOM is loaded in the same sequence $.domLoaded(main1); $.domLoaded(main2); | |||||||||||