The native DOM method does the right thing:
$('.cssbuttongo')[0].click();
^
Important!
This works regardless of whether the href
is a URL, a fragment (e.g. #blah
) or even a javascript:
.
Note that this calls the DOM click
method instead of the jQuery click
method (which is very incomplete and completely ignores href
).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…