3
I’m doing a user-friendly Dashboard and I need a button to edit. When the edit button runs it just makes code appear and disappear, but wanted to know if it is possible to execute jQuery code and select the id of the button.
<a id="1" class="edit">E</a>
<a id="2" class="edit">E</a>
<a id="3" class="edit">E</a>
$('.edit').on('click',function(){
var id = $('.edit').id;
alert(id);
});
This html is badly formatted
<a id="1"edit">
... theedit
is a class?– Sergio
@Sergio sorry yes is a class="Edit" and in jquery missing the '.Edit'
– eduardo costa