I have something like this:
…
<div id="d120" >content</div>
<div id="d123" >content</div>
<div id="d112" >content</div>
<div id="d145" >content</div>
<div id="d134" >content</div>
//Insert here hello world
<div id="bla" >asd</div>
<div id="footer" >asd</div>
anybody knows how to insert html after all the divs that have id like d+number
If the format doesn’t have anything between those divs and
#blalike your example, here’s a safer approach using.before()(sincediv[id^=d]would match<div id="doodlesticks">as well).Update: Since you said it’s possible to give them a class, I’d do that, so give the content divs a
class="content"and use this jQuery: