Replacing Specific color code in css using jquery

前端 未结 5 1452
孤独总比滥情好
孤独总比滥情好 2020-12-19 04:10

I want to replace #789034 code to another code like #456780 where ever it finds in main.css using jquery

I am having a main.css file something like below :



        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 04:51

    you might consider changing it with jquery.

    $(function() {
      $('.awesome-one').hover( function(){
         $(this).css('background-color', '#789034');
      },
      function(){
         $(this).css('background-color', '#456780');
      });
    });
    

提交回复
热议问题