Skip to content

Instantly share code, notes, and snippets.

@kevin-shu
Created April 17, 2013 06:27
Show Gist options
  • Save kevin-shu/5402191 to your computer and use it in GitHub Desktop.
Save kevin-shu/5402191 to your computer and use it in GitHub Desktop.
ranking
function ranking(elem, index) {
if (index>=0 && index<5113) {
elem._src.rank = 1;
} else if (index>=5113 && index<10226) {
elem._src.rank = 2;
} else if (index>=10226 && index<25566) {
elem._src.rank = 3;
} else {
elem._src.rank = 4;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment