CSS hover selector for background-color not working after dynamic change of background-color with jquery

前端 未结 5 1208
臣服心动
臣服心动 2020-12-15 17:06

I dynamically change the background color of a div with the jquery .css() method. I also want to have a CSS hover selector on that same div that ch

5条回答
  •  抹茶落季
    2020-12-15 17:32

    if you just need to delete the inline style you can use

    $("#yourselector").attr("style", " ");
    

    It will replace your inline style with style=" "

提交回复
热议问题