Skip to content

Instantly share code, notes, and snippets.

@boxxxie
Forked from anonymous/BJMXR0wM
Created March 24, 2012 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boxxxie/2189232 to your computer and use it in GitHub Desktop.
Save boxxxie/2189232 to your computer and use it in GitHub Desktop.
rating.js
function fill_stars(rating,full_img,half_img)
{
var rattings = ['one','two','three','four','five'];
if(rating > 0){
document.getElementById("one").src = full_img;
}
if(rating > 1){
document.getElementById("two").src = half_img;
}
if(rating > 1.5){
document.getElementById("two").src = full_img;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment