add css rule using jquery

后端 未结 2 1100
渐次进展
渐次进展 2020-12-19 11:32

i got a css rule like this:

#imgwrapper {display: block;position: relative;width:auto;height:auto;}

so i got a hyperlink that when it\'s cl

2条回答
  •  自闭症患者
    2020-12-19 12:13

    See the $.css() function

    $('a.whatever').click(function() {
      $('#imgtarget').css('cursor' , 'crosshair');
      $('#imgwrapper img').css('cursor', 'crosshair');
    });
    

提交回复
热议问题