191
rated 0 times
[
197]
[
6]
/ answers: 1 / hits: 17436
/ 11 Years ago, mon, april 1, 2013, 12:00:00
I'm having trouble getting a selector to work properly.
I have this HTML:
<div.wrapper>
<div.ui-controlgroup-controls>
<form>
<div.ui-btn></div>
</form>
<div.ui-btn></div>
<div.ui-btn></div>
<div.ui-btn></div>
<div.ui-btn></div>
</div>
</div>
and I'm trying to select the div
tags, which are children of ui-controlgroup-controls
- which means excluding whats inside the form.
This is what I'm trying:
// el is my div.wrapper element
el.children[0].getElementsByTagName(div);
However this does not work, because the div inside the form ends up in the selection.
Question:
How can I select the elements correctly when I don't want to use jQuery?
More From » selection