How to change css property using jquery with this code

后端 未结 3 756
天涯浪人
天涯浪人 2021-02-14 19:21

\"#business\" is currently set to background: #323232; How can I change it to #000; after I click on \"#business\" and back to 323232 once the menu is closed?

$         


        
3条回答
  •  鱼传尺愫
    2021-02-14 19:59

    If you want to change the background of an element (in your case "#business") to a color, you simply do:

    $("#business").css({
         "background": "#000"
    });
    

    But I am not sure what you mean by the "menu", you should probably show us the code of your HTML!

提交回复
热议问题