[ACCEPTED]-How to change css property using jquery with this code-css

Accepted answer
Score: 34

You can use the css method to change a CSS 6 property (or multiple properties if necessary):

    jQuery.fx.off = true;
    $(this).css("background-color", "#000");
$('html').click(function() {
    $("#business").css("background-color", "#323232");

Note 5 that I've combined the 2 event listeners 4 you had bound to #business as it's makes no difference 3 to just bind the one.

As a side note, is 2 there a reason you are passing an empty 1 string to hide? That shouldn't be necessary.

Score: 4

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

     "background": "#000"

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

Score: 1

The css function is used for changing CSS properties 1 like background.

$('html').click(function() {
  $('#busniessmenu').css('background-color', '#323232');

  $(this).css('background-color', '#000');

More Related questions