Geographic Information Systems Asked on April 16, 2021
view.when(function(){
view.on("click", function () { doSomething = !doSomething;});
});
The above works as a global click event. HOWEVER, I am trying to specify a specific div elem not a global elem. i.e. The logic I’d like:
view.when(function(){
view.on("click", #myDivElm function () { doSomething = !doSomething;});
});
You can set a click event for the element itself.
var myElement = dom.byId("myElement");
on(myElement, "click", function(evt){
doSomething = !doSomething;
});
Answered by kenbuja on April 16, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP