简体   繁体   中英

How can I trigger click on a child anchor element with jQuery?

$('#Container a:nth-child(2)').click();

This is inside a function. When the function is performed I want it to click on the second anchor element.

click function in jQuery is an event listener, your syntax will be valid on pure javaScript

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM