We wish to avoid an excessive class usage on our code.
We have the following html structure:
<div id='hello'></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div id='hello2'></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div id='hello3'></div>
<div></div>
<div></div>
How can we select, for example, all divs after #hello
, but just until #hello2
?
Is this possible using a mere css selector?
Can we achieve this using a script language (jquery) ?
Update:
Despite needing a selector, that indeed work, I need this to be placed inside a javascript conditional... Sorry for not mention it up front and more clearly.