Search events

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

Description:  Klevu framework comes with a list of search events and functions that help the power up of the search box and landing page

These are stored as part of the klevu.searchEvents formatted as follows


  • box
    • focus – responsible for preprocessing the focus event and executing the scope chain
    • keyup – responsible for preprocessing the keyUp event and executing the scope chain
    • submit  – responsible for preprocessing the submit event and executing the scope chain
  • general
    • documentClick – responsible for preprocessing the document click event and executing the global chain documentClick
    • documentScroll – responsible for preprocessing the document scroll event and executing the global chain documentScroll
  • functions
    • bindAllExtraEvents – activates the documentClick and documentScroll  events
    • bindAllSearchBoxes – selects all predefined boxes based on the selector and clones a base box for each one, also links the events for focus,keyup and submit

We automatically add a coreEvent named buildSearch that will execute when 

  • the document is in interactive state
  • the base search instance is build

This event will execute the 

  • bindAllSearchBoxes
  • bindAllExtraEvents

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>