Use jQuery to remove an inline style

后端 未结 6 1052
我在风中等你
我在风中等你 2021-01-17 10:44
    ...

Is it possible with jQuery (or plain javascript) to remove ju

6条回答
  •  温柔的废话
    2021-01-17 11:16

    $('.mydiv ul').each(function(){
        $(this).attr('style', $(this).attr('style').replace('height: ', 'height:').replace('height:'+$(this).css('height')+';', '')); 
    });
    

    just make sure the style value format either "height:111px;" or "height: 111px;"

提交回复
热议问题