jQuery: selector (classname with space)

后端 未结 4 1152
清歌不尽
清歌不尽 2020-11-29 21:23

I\'m trying to get a div which has \"panel current\" as classname. The problem is the space - how can I select it?

4条回答
  •  萌比男神i
    2020-11-29 21:50

    panel current is not a class name, actually it is two class names. You could use the following selector:

    $('.panel.current')
    

提交回复
热议问题