1
I have this code here:
HTML: <button class="btn btn-danger btn-circle delete" type="button"><i class="fa fa-remove"></i></b</td>
$('#submit1, #submit2').click(function () {
if (this.id == 'submit1') {
alert('Submit 1 clicked');
}
else if (this.id == 'submit2') {
alert('Submit 2 clicked');
}
});
I’d like to pass one class in place of a id, how do I? Should I use a this.class
in place of this.id
? and pass :
$('.submit1, .submit2').click(function () {
if (this.class == 'submit1') {
alert('Submit 1 clicked');
}
});
Include your html to the question
– Leandro Angelo