Target Elements by ID Using jQuery


你还可以根据id属性来获取元素

首先用$("#target3")来选择id为target3button元素。

注意,就像CSS一样,在id的名字前加上 #

然后使用jQuery的.addClass()方法来添加 animatedfadeOutclass.

例如:下面的代码就是给id为target6button元素添加fade out效果的:

$("#target6").addClass("animated fadeOut")




相关文章:

  • 2018-02-06
  • 2019-06-19
  • 2021-09-19
  • 2022-01-01
  • 2021-11-17
  • 2021-09-19
  • 2021-10-09
  • 2021-09-19
猜你喜欢
  • 2018-11-23
  • 2021-09-19
  • 2021-09-16
  • 2021-08-08
  • 2021-12-16
  • 2021-09-19
  • 2021-09-19
相关资源
相似解决方案