How to remove css property in jQuery

前端 未结 10 2001
逝去的感伤
逝去的感伤 2020-12-04 07:48
if(prev_clicked)
{   
    $(\"#accordion li a.category\").css(\'background-image\', \'url(\"img/off_all_channel.png\")\');                    
    $(\"#accordion li          


        
10条回答
  •  醉话见心
    2020-12-04 08:03

    We have two ways, either you can directly remove the applied CSS style class which is applied to DOM element or remove the applied CSS style from element

    //Remove the class associated with element
    
    $('#ID').removeClass("cssClass");
    
    //Remove the CSS style from DOM element
    
    $('p').css({"color":""});
    

提交回复
热议问题