Tuesday, 27 August 2013

how to add the click attch event dynamically

how to add the click attch event dynamically

I need to attach the click event dynamically using javascript. My sample
code is given below.
require(["dijit/form/ToggleButton", "dojo/dom-construct"], function
(ToggleButton, domConstruct) {
var newButton = new ToggleButton({
showLabel: true,
checked: false,
onChange: function (val) { frame(this); },
label: item.getAttribute('label')
}, item.getAttribute('id'));
});

No comments:

Post a Comment