Click link contained in 3rd
  • tag on load
  • 前端 未结 3 1684
    旧巷少年郎
    旧巷少年郎 2021-01-27 13:33

    I have a

      :

    相关标签:
    3条回答
    • 2021-01-27 13:48

      You may want to use the nth-child selector

      $('ul li:nth-child(3) a').click() //something like that
      
      0 讨论(0)
    • 2021-01-27 13:59
      $('ul li:nth-child(3) a').trigger('click');
      

      That's it!

      0 讨论(0)
    • 2021-01-27 14:00

      Use the nth-child selector. And put your code in a jQuery ready event listener. Try this:

      $(document).ready(function(){
          $('ul.options_inner li:nth-child(3) a').trigger('click');
      });
      
      0 讨论(0)
    提交回复
    热议问题