How to correctly affect multiple css properties in jquery <p>Below is an example of how I currently would affect two css properties for the same div in jquery:</p> <pre><code>$('#mydiv').css("width",myvar+"px"); $('#mydiv').css("margin-left",myvar+"px"); </code></pre> <p>I don't believe this to be the most efficient method as it requires two lines of code for one div, can somebody please show me a more susinct (tidier) method of writing the same thing?</p>