-
-
Save boxxxie/2189232 to your computer and use it in GitHub Desktop.
rating.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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