There is a group of selectors

... #article-node-form--3 #edit-body--3 #article-node-form--4 #edit-body--4 ... 

how to address them without indexes?

I tried it - I did not succeed:

 $('div[id^="article-node-form"] div[id^="edit-body"]') 
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

html:

 <div id="article-node-form--3"><div id="edit-body--3">123</div></div> <div id="article-node-form--4"><div id="edit-body--4">456</div></div> 

js:

 jQuery('div[id^=article-node-form] div[id^=edit-body]').css({ color: 'red' }); 

https://jsfiddle.net/sod2efpz/