Click trigger event with css selector in prototype

I am new to Prototype js. I have such an element

<li id="toolbar-save" class="button"> <a class="toolbar" href="www.mydomain.com/register"> Save &amp; Close </a> </li> 

I have a selector for the $$('#toolbar-save a') tag $$('#toolbar-save a') . Using this selector, how can I fire the click event? or any other way you can offer? thanks in advance.

+4
source share
1 answer
 $$('#toolbar-save a')[0].click(); 

Fiddle

+9
source

Source: https://habr.com/ru/post/1486124/


All Articles