How to apply a click()?

How to apply a click()?

Assume I have the following HTML structure:


  1. <div class="aaa bbb">
  2.   <a id="ccc8888" class="......." href="javascript://">
  3.     <span class="ddd eee">click here</span>
  4.   </a>
  5. </div>
  6. ....
  7. <div class="aaa bbb">
  8.   <a id="ccc7456" class="......." href="javascript://">
  9.     <span class="ddd eee">click here</span>
  10.   </a>
  11. </div>


When the users clicks manually with the mouse on "click here" text then something is expanded on webpage.

How do I simulate a click on ALL/EACH (!) such items on a webpage?

The items differ only in the id number (in the first element above = 8888).

I need something like a wildcard mechanism.


The following solutions do not work:

$('a#id="ccc*"').click();

or

$('a[id="ccc*"]').click();

or

$('id="ccc*"').click();


How else does that work?

Peter