Jquery wild card character

前端 未结 4 503
傲寒
傲寒 2020-12-20 23:39

I have 3 controls with id control_1, control_2, control_3.

I want to hide these controls.

Currently I am using this:

4条回答
  •  北海茫月
    2020-12-21 00:04

    Why not replacing IDs with a class like .controls? Then just use:

    $(".controls").hide();
    

提交回复
热议问题