Help, need get attribute name from current function
Hello, i need help with getting the name of an attribute.
for example, i have this code:
it shows an alert with "Anything", which i understand why, but i want it to show an alert that says the name of the attribute, in this case and alert that says: "ShowAlert"
- <script src="http://code.jquery.com/jquery-latest.js"></script>
<a href="#" ShowAlert="Anything">Click To Show Attribute Name</a>
var ThisAttrName = $(this).attr('ShowAlert'); // I dont know how to get this Attribute name "ShowAlert"
alert(ThisAttrName); // Show This Attribute Name "ShowAlert"
how can this be done?