I´ve create a template for meteor.js, what I want is to apply a jQuery effect for an onclick event on tran_button, the idea with the effect is that div associated to button disappear. I don´t get any error through meteor console, or firebug console.
Template.tran.events({
'click .tran_button' : function(){
$(this._id).slideUp('slow');
}
});
Thanks.
$(event.target).slideUp('slow');
Pass the event to the function and get id from event.currentTarget:
Template.tran.events({
'click .tran_button' : function(event){
$('#' + event.currentTarget.id).slideUp('slow');
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With