How to simulate anchor link click

前端 未结 6 679
渐次进展
渐次进展 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

    Make sure you have your jQuery code wrapped in a ready block like so

    $(document).ready(function(){/* your code here */});
    

    This ensures scripts are fired after all the content and images are loaded.

提交回复
热议问题