What do [] brackets after a Jquery selector mean?

后端 未结 7 690
借酒劲吻你
借酒劲吻你 2021-01-18 07:22

I\'m using this code to play a preloaded mp3 file.

var shuffle = $(\"#shuffle\")[0]; 

shuffle.play();

Shuffle is my id. I got the code o

7条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 08:09

    JQuery returns an array. [0] takes the first item in the array.

提交回复
热议问题