I have some HTML I want to process with jquery.
Pretty simple but I cannot get around getting all the elements with the same class:
<div class="myclass on"></div>
<div class="myclass off"></div>
<div class="myclass on"></div>
If I do this
$(".myclass")
I get only one. Any help?
EDIT
I actually only want the 'myclass on' to nest some html in each one to get this:
<div class="myclass on"><img src="bar.png"></div>
<div class="myclass off"></div>
<div class="myclass on"><img src="bar.png"></div>
$(".myclass")returns all element with the classmyclass$('.myclass')it must work. Can you post what you have written.