How can I select the 'title' attribute in an input tag in jquery?

Viewed 66377

Just like we have selectors like ("#id_name"),(".class_name") (":input_type")..etc in jquery, how can I select the title attribute from an input tag?

Example: < input type="abc" id="xyz" title="information" >

I need a selector to select title value.

10 Answers
var title = $("#xyz").attr("title");
// console.log(title) will print **information**;
Related