I would like to use "event handler" after click "btn"?


#1

I would to do after event click like this

Template.myTpl.events({
   'click .myBtn': function (e, t){
      // do something
   },
 '?event after click? .myBtn': function (e, t){
      // do something after above..
   }
});

Please help me.


#2
'mouseup .myBtn'

Here is the documentation about the events managed by jQuery : http://www.w3schools.com/jquery/jquery_events.asp


#3

But sometime I use Enter Key. It the same or not


#4

use setTimeout in the ‘click’ event to trigger you function few milliseconds later after the click


#5

Hi,
Something like this?
http://meteorpad.com/pad/N4FFZp9TGB5ScWNYC/AfterClick


#6

Just add a property that will track if button was clicked:

Template.myTpl.events({
   'click .myBtn': function (e, t) {
      t.isClicked = true;
      // do something
   },
   '<any event>': function (e, t) {
      if (t.isClicked) { 
        // do something after above..
      }
   }
});