I tried using the js-cumulus library http://jeroenvanwarmerdam.nl/content/resources/javascript/jscumulus/js-cumulus.html and in IE7 the blue background image doesn't appear. But it works if I use this jQuery code after initialization of the library.
jQuery('.tagCloud').css('background-image', 'url(bg_blue.gif)');
How can I do this using only CSS since it works in other browsers?
Please try:
jQuery('.tagCloud').css('background-image', 'url(/bg_blue.gif)');
or
jQuery('.tagCloud').css('background-image', 'url("/bg_blue.gif")');
or
jQuery('.tagCloud').css('background-image', 'url("bg_blue.gif")');
This should work:
# Notice the double quotes around the filename.
jQuery('.tagCloud').css('background-image', 'url("bg_blue.gif")');
You can give css class to that element also.
.imageclass
{
background-image:url(/bg_blue.gif);
}
$('.tagCloud').addClass('imageclass'); // same way you can use remove class
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.