LdWidgetUid JS

From WidgetAvenue Wiki

Jump to: navigation, search

Contents

Why use this function?

Many host platforms do not support inline events handlers such as onclick or onmouseover, which are placed directly within the HTML code. Our API provides a cross platform solution to attach event handlers to the widget, or nodes inside it.

Summary

ldWidgetUid_JS[Function Name] functions can be defined in the waJS file to be triggered from the waHTML files by specific events. In order to attach an event to a node,add the class attribute ldWidgetJS using the following syntax:

class="ldWidgetJS_[Name Of Your Function]_[Event Name]"


Syntax

ldWidgetUid_JS['Name Of Your Function'] = function(elt)
{
    ...
}

where

  • name is a string representing the name of the function
  • elt is the element (node) which received the event which triggered the execution of the function

Example

Adding Javascript

Personal tools