开发者

why does a jquery trigger click not update the location.hash?

开发者 https://www.devze.com 2023-02-28 18:10 出处:网络
Given something like ... trigger(\'click\') Where the selector is a link like so: <a href=\"#/wow/2\">click it </a>

Given something like ... trigger('click')

Where the selector is a link like so:

<a href="#/wow/2">click it </a>

Why does that hash not end u开发者_C百科p in the URL or triggering a $(window).hashchange event?

Thanks


trigger("click") fires the onclick event handler, it is not the same as a person actually clicking.

example: http://jsfiddle.net/dffsC/

0

精彩评论

暂无评论...
验证码 换一张
取 消