Invoking Methods
17 May 20161 minute to read
The functions can be invoked the same way the properties are accessed. The following syntaxes define the ways to invoke the public methods of the widgets.
1. var obj = $("jquery-selector").data("<ejm-plugin-name>"); **[Recommended method]**
obj.methodName(param1, param2, param3, ...)
Example:
var lwObject = $("#btn").data("ejmListView");
lwObject.selectItemByIndex(2);
2. $("jquery-selector").<ejm-plugin-name>("methodName");
Example:
$("#button").ejmButton("disable");
3. $("jquery-selector").<ejm-plugin-name>("methodName", "param1", "param2", …);
Example:
$("#listview").ejmListView("selectItemByIndex", 2);