I need to use JavaScript to simulate the action of clicking buttons. How do I achieve it? Can I achieve it with jQuery?
Advertisement
Answer
Yes, you can do it with jquery. Use trigger
function. Here documentation. Here is sample:
$('#foo').trigger('click');