0

I would like to conditionally change the background image of my Cluetips during run-time via jQuery. I use 'rounded' as cluetipClass.

I thought this would do the trick:

$('.cluetip-rounded').css("background", "url(infobox_left.png)");  

But in the Chrome Developer Toolbar, I can see that the CSS settings are completely untouched.

How can I change the cluetip CSS-settings?

Best, David

user1360250
  • 331
  • 1
  • 3
  • 14

3 Answers3

0

Use this:

$('.cluetip-rounded').css("background-image", "url(infobox_left.png)");

and make sure path of image is valid.

Chinmaya003
  • 474
  • 3
  • 10
  • Thanks for your answers. Image path is valid, and if I address other classes, it works perfectly. Only for .cluetip-rounded, it does not work. Any other ideas? – user1360250 Apr 27 '12 at 10:03
0

It should work. Make sure you have a correct image path. Look at this: http://jsfiddle.net/DRN3P/

Jay
  • 1,384
  • 1
  • 17
  • 30
0

cluetip "clones" the hidden div, make sure you invoke the cluetip again after changing the class or alter the "cloned" content.

anon
  • 1