I want to pass an argument to an event in dojo 1.7+.
Suppose I have the following module:
define(
[ "dojo/dom", "dojo/dom-style", "dijit/registry", "js/busyIndicator",
"dojox/mobile/ListItem", "dojo/dom-class",
"ppwidgets/MyCommunitesRecentListItem", "js/utils"
],
function(dom, domStyle, registry, busyIndicator, ListItem,
domClass, MyCommunitesRecentListItem, utils) {
return {
sortBy: function(sortType) {
}};
}
);
<h3>In html:</h3>
In regular html I can do this: onClick = "sortBy ('date')"
, but in dojo, I have to use this:
data- dojo -attach-event = "onClick: _sortBy"
I want to bind the sortBy () function to the button . How to pass the sortType function to the sortBy () function.
Thanks in advance:)
source
share