jQuery question, pass an array of css values?


$('#map').css('width', '100%') ;
$('#map').css('height', '600px') ;

Is there are shorthand way of doing this, maybe by passing an array of values?

Yup.


$('#map').css({
    width: '100%',
    height: '600px'
});

http://api.jquery.com/css/#css2

Ah, thanks!

I will try and get more familiar with the api docs, before asking such a question again.