How to click a link using jquery or javascript? -
i have link:
<a href="#panel2-2">manage lists</a>
i want "click" link using jquery or javascript. i've tried:
$("#panel2-2").click(function(){}); $("#panel2-2").trigger('click');
it doesn't work! how can click using javascript?
you need use jquery attribute equals selector.
description: selects elements have specified attribute value equal value.
for case, use this:
$( "a[href='#panel2-2']" ).click();
Comments
Post a Comment