jQuery logo

You can set multiple attributes for HTML element with jQuery.

        $("#myControl").css({ 
            'color': 'red', 
            'background-color' : '#000' 
        });

 

Another way to set multiple attributes for HTML element with jQuery is like this:

        var cssObj = { 
        'background-color' : '#000', 
        'color' : 'red' 
      } 
        $("#myControl").css(cssObj);