DOM events

klevu.extend( target [, object1 ] [, objectN ] )
Returns: Object

Description:  Klevu framework comes with a interface to execute functions when DOM is fully loaded

klevu.ready(object or functionSource) – when the document is in ready state , when DOM is in this state klevu.isReady will be true

  • object contains :
    • name: name of the function to be executed – unique per event
    • fire: source code of the execution

klevu.interactive(object or functionSource) – when the Document enters the interactive state, if possible to detect or latest when the document is ready, when DOM is in this state klevu.isInteractive will be true

  • object contains :
    • name: name of the function to be executed – unique per event
    • fire: source code of the execution

Example:

klevu.ready(
  function(){
    console.log("document is loaded")
  }
);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>