jQuery: Find the title attribute of the first emphasized in the page
jQuery Fundamental - I : Exercise-28
Find the title attribute of the first <em> in the page.
<body> <p>jQuery Exercises, Practice, <em title="Real life jQuery or all.">Solution</em>.</p> <p id="id1"></p> <button id="button1">Click to see the effect</button> </body>
Sample solution :
HTML Code :
JavaScript Code :
Used Methods :
- .attr() : Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
Contribute your code and comments through Disqus.
Previous: Using jQuery display the checked attribute and property of a checkbox as it changes.
Next: Using jQuery find all links with an hreflang attribute "de".
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics