CSS / Javascript Show / Hide DIV using a CSS class?

前端 未结 7 1813
陌清茗
陌清茗 2020-12-20 17:14

I\'ve googled around and found many scripts for hiding and showing DIV contents, as a toggle on button click.

But they are work using ID\'s.

I would like to

相关标签:
7条回答
  • 2020-12-20 18:13

    You could simply use $(".className").hide();

    The $(".somthing") do the same as $("#somthing"), except it's for a class instead of an ID.

    0 讨论(0)
提交回复
热议问题