I've got an html anchor element:
<a title="Some stuff here">Link Text</a>
...and I want to get the contents of the title so I can use it for something else:
$('a').click(function() {
var title = $(this).getTheTitleAttribute();
alert(title);
});
How can I do this?
$('a').click(function() {
var title = $(this).attr('title');
alert(title);
});
$('a').click(function() {
var title = $(this).attr('title');
alert(title);
});
$(this).attr("title")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With