How do you get the attribute of an HTML tag in jQuery?
Developers can use this.title function inside the function to get the attribute of an HTML tag in jQuery. Use the following script:
BY Best Interview Question ON 26 Jan 2019
Example
$('a').click(function() {
var myTitle = $(this).attr ( "title" ); // from jQuery object
//var myTitle = this.title; //javascript object
alert(myTitle);
});