All samples are using Ink.requireModules, please read how to use it at Ink.requireModules section

Ink.Dom.Loaded_1 class

Functions
Function name Description
.run([win], fn) Specify a function to execute when the DOM is fully loaded.

.run([win], fn) method

Specify a function to execute when the DOM is fully loaded.

Accepts

  • win

    windowWindow object to attach/add the event
  • fn

    Callback function to be executed after the DOM is ready

Run a function on DOMContentLoaded AKA on DOM Ready

Should be used to run some code that will manipulate DOM in the page

Code

<html>
<head>
    <script src="http://cdn.ink.sapo.pt/3.0.0/js/ink.js"></script>
    <script>
      Ink.requireModules(['Ink.Dom.Loaded_1'], function (DomLoaded) { 
        DomLoaded.run(function(){
            alert('DOM is Ready');
            // ... 
        });
      });  
    </script>
</head>
<body>
</body>
</html>