Jeeten Parmar Jeeten Parmar - 4 months ago 13
jQuery Question

Find semantic markup tags using jquery

I want to find

semantic markup tags
using jquery.


HTML :

<header id="header">Header</header>
<footer id="footer">Footer</footer>


I tried all following code but it is not working.

jQuery(this).find("header")
jQuery(this).find("#header")


Please help me to solve this.

Answer

try wrapping you code under document.ready function

$(function() {
  // your code
});