Is there a way to change the background-image style with javascript? i currently have:
if($(".stLarge").attr.backgroundImage = "http://w.sharethis.com/images/facebook_32.png") {
console.log('hello');
$('.stLarge[backgroundImage="http://w.sharethis.com/images/facebook_32.png"]').attr("backgroundImage", "url(/images/facebook.png)";
}
It's getting inside the if statement but not executing the image change. Any idea what i have done wrong? Thanks in advance