JavaScript & jQuery and the use of periods

后端 未结 2 499
刺人心
刺人心 2021-01-27 15:45

I am confused when to use the period before the class names when referencing them. In this example why does the first use of the \'active-slide\' class use a period beforehand w

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-27 16:19

    $('.active-slide') is using jQuery's element selector. (add|remove)Class('active-slide'); is modifying the element.

提交回复
热议问题