Can anyone give me some tips on how best to do this.
I try to get all the text that is after ".main"
I know that it can be simple, but he collected my brain all day shortly before Christmas. So I thought that instead of emphasizing myself, I would like to find some guidance.
The sample code returns only Text in P tag , but I would like to return Text not in it own element and p tag
console.log($("#container").find(".main").next().text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <div id="container"> <div class="main"> WOOP IN MAIN </div> Text not in it own element <p> Text in P tag </p> </div>
javascript jquery
Chris beckett
source share