$('a').trigger('click'); not working

后端 未结 9 2441
南旧
南旧 2021-02-19 04:06

How do I make jquery click test



        
9条回答
  •  借酒劲吻你
    2021-02-19 05:03

    Just click:

    $("#mylink").click();
    

    If your scripts are in the head then you need to ensure that the element exists, so the script should be executed when document is ready.

    $(document).ready(function () {
        $("#mylink").click();
    });
    

提交回复
热议问题