I have the following markup:
<body id="terms_and_conditions_page" dir="ltr">
<div class="main-wrapper"></div> <---------* Edit
<div> <-------*
<div class="page_banner describes_page_content body-bg"></div>
<div class="content-bg"></div>
</div>
</body>
and I am trying to add a class (tc-content) to a div with no class name so the markup will look like:
<body id="terms_and_conditions_page" dir="ltr">
<div class="main-wrapper">
<div class="tc-content"> <-------*
<div class="page_banner describes_page_content body-bg"></div>
<div class="content-bg"></div>
</div>
</body>
I tried $('#terms_and_conditions_page:nth-child(2)').addClass('tc-content');
but it adds a class to every child of this empty div.
Is there an easy way to do it ?
Edit: sorry guy, I copied that from firebug so it skipped the closing div. See the edit
There are many :