re-firing a click event on a link with jQuery

前端 未结 2 1958
广开言路
广开言路 2020-12-07 05:08

i\'ve got a page (asp.net) where I trap the click event of a link. i then do some dirty checking and present a dialog to the user,

$(function() {
    var c         


        
2条回答
  •  抹茶落季
    2020-12-07 05:37

    you can use the trigger function, Change:

    $(clickedLink).click();
    

    to

    $(clickedLink).trigger("click");
    

    A better way would be to separate your click functionality out into a separate function and call this, however the above will work.

提交回复
热议问题