Meteor: Calling/trigerring events from inside JavaScript? -


i have event looks this:

template.foo.events({     'bar': function() {         console.log("hello!");     } }); 

how call/trigger within client using js? like:

qwe = new event(foo); qwe.dispatchevent();? 

see events in meteor docs: http://docs.meteor.com/#/basic/template-events

"the first part of key (before first space) name of event being captured. pretty dom event supported. common ones are: click, mousedown, mouseup, mouseenter, mouseleave, keydown, keyup, keypress, focus, blur, , change."

so in example, 'bar' should replaced 'click'. fired when template clicked.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -