Q:

How to put multiple style attributes in jquery

$('#header').css('left', 200 - $this.scrollLeft());

I need to put multiple style attributes in the above line. The start and end part needs to be intact.
Please help. Thanks in advance.

A:

As explained in the documentation, you can pass an object to the .css() function to set styles for multiple properties in a single call. The key is the name of the property and the value is the value to set. For example:
$('#header').css({
    "left" : 200 - $this.scrollLeft(),
    "top" : 600
});

would set left to the value of 200 - $this.scrollLeft(), and top to 600.

