$.domLoaded( main_function )
Parameters
NameTypeDefaultPossible ValuesDescription
main_functionfunctionfunction and function references Acts as the callback function, once DOM is loaded.
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
							$.domLoaded(function() {
							
								// your code goes here
								
							});
						
Example 2
JS
							function main() {
							
								// your code goes here
								
							}
							
							// Triggered after the DOM is loaded 
							$.domLoaded(main);
						
Example 3
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);