I would like to do this:
<div style="float: left;
width: 59px;
background: transparent url('http://download.com/47.jpg') no-repeat scroll -132px -1px;"
class="cIconSmall">
</div>
and I’m thinking I should use this:
$("#YourElementID").css({
float: "left",
width: "59px",
background: "transparent url('http://download.com/47.jpg') no-repeat scroll -132px -1px"
});
Any ideas?
Thanks
You’re thinking correctly. Using the
css(map)method is the way to go.http://api.jquery.com/css/
Might be nicer as a css class, though… then you can just write
$(".cIconSmall").addClass("icon47");but there’s a time for everything…