Reputation: 4918
I'd like to know the proper way to set CSS3 multiple backgrounds for an element with jQuery. I want to end up with
content #{
background:
url(images/snapGrid2.gif) left top,
url(clientImages/vector-old-paper-1627.jpg);
}
Thanks
Upvotes: 0
Views: 48
Reputation: 1126
Here it is.
$('.mbg').css('background', 'url(http://placehold.it/300x200) left top no-repeat, url(http://placehold.it/300x200) right bottom no-repeat')
Yep, it is basically the same as setting a single background image.
See it for yourself: jsFiddle.
Upvotes: 2