I have two buttons with the same ID:
<button type="submit" onclick="//do something" id="theID">button 1</button>
<button type="submit" onclick="//do something" id="theID">button 2</button>
I would like to click both the buttons using prototype. So far I've tried the following but it doesn't work.
$('theID').each(function(item) {
item.click();
});
How can I easily click both buttons using prototype?