How to simulate anchor link click

前端 未结 6 656
渐次进展
渐次进展 2020-12-15 04:02

I\'m trying to trigger a link click for .jquery. Does someone know why the following doesn\'t work.



        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 04:43

    Use click()

    $("#google_link_proxy").click(
        function(){
            $("#google_link").click();
        }
    );
    

    fireEvent and observe is not part of jQuery API

提交回复
热议问题