tags:

views:

29

answers:

2
function change_star_image(star_id){
 //$("#star_rating_image_"+star_id).css("background-image","url(images/full-star.png)");
 $("#star_rating_image_"+star_id).css('background', 'url(images/full-star.png)');
}

Background image not changed,

The above is my snippet,

Thanks

A: 

The jQuery looks fine. You should check :

  • If the function is called correctly (use a debugger or add an alert)

  • If "#star_rating_image_"+star_id is a valid element

  • If the image is accessible

To do so, I recommend using the debuger of firebug.

marcgg
A: 

Problem fiexed,

stupid reason is, in server image missing...

Bharanikumar
You shouldn't mark people down for marking you question down. I marked it down as it has come down to user error, it isn't a coding error.
danrichardson