jQuery basics - selector
Posted
by rkrauter
on Stack Overflow
See other posts from Stack Overflow
or by rkrauter
Published on 2010-04-26T05:19:48Z
Indexed on
2010/04/26
5:23 UTC
Read the original article
Hit count: 230
jQuery
I feel dumb.. Why is my "header" div not being selected? It's background color is not being changed. I am learning about the + operator so I am not looking for a different selector.
E + F an F element immediately preceded by an E element
$("#divA + div").css("background-color", "red");
Html
<div id="divA">
<div>
Header</div>
Lorem Ipsum is simply dummy text of the
printing and typesetting industry.
</div>
Thanks!
© Stack Overflow or respective owner