jQuery class selector doesn't work and id selector works only with “body”

前端 未结 5 761
生来不讨喜
生来不讨喜 2021-01-21 17:32

I\'m trying to apply CSS values with jquery but class selector or id selector does not not work for some reason.

Here is my fiddle:

As you can see nothing happen

5条回答
  •  误落风尘
    2021-01-21 18:03

    Your selector is missing the # which is used for selecting tags by id:

    $("#kitten")
    

提交回复
热议问题