I want to grab attributes of <a href>
link and spit those attributes to another script file as post
data. Following are the details of what I have done till now
Html link
<a href="#" class="submit-button" id="deleteRecord" attr1="xyz" attr2="abc" >Delete</a>
Now the jQuery code is as follows
$(document).ready(function(){
//Other code here
$(document).on('click','#deleteRecord',function(){
//I want to submit variables attr1 and attr2 as post data to delete_post.php
});
});
Thanks in advance.