Daniel Elliott
Daniel Elliott

Reputation: 22857

JQuery Selector for target element

I have a bit of JS using JQuery

function removeTag() {
    $('{...}').doSomething();
}

$(document).ready(function() {
    $('.RemoveTag').click(removeTag);
});

Is there anything I can replace {...} with to give me the element that was clicked?

Kindness,

Dan

Upvotes: 2

Views: 470

Answers (1)

Ned Batchelder
Ned Batchelder

Reputation: 375564

function removeTag() {
    $(this).doSomething();
}

Upvotes: 6

Related Questions