Meteor jQuery $( this )


#1

I can’t figure out how to use “this” while using jQuery in meteor

Template.layout.events({
    'mouseover .button': function () {
        $( this ).addClass('reverse');
    }
});

Any ideas?


#2
Template.layout.events({
    'mouseover .button': function (e) {
        $(e.target).addClass('reverse');
    }
});

Solved it

/thread