How can I use jQuery to append p.test to h3 if p is outside of h3 like below? So basically I want to pick it from where it is and put it in h3.
<h3>
<a href="/">Test</a>
</h3>
<p class="test">Test Test Test</p>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t, at least not reliably. Heading elements are defined as only being able to contain inline elements. Paragraphs are not permitted inside headings.
If it was permitted then the syntax would be: