Skip to content

Instantly share code, notes, and snippets.

@ethanfu
Created November 3, 2014 14:16
Show Gist options
  • Save ethanfu/1f8ec5257ae49ed919c5 to your computer and use it in GitHub Desktop.
Save ethanfu/1f8ec5257ae49ed919c5 to your computer and use it in GitHub Desktop.
get wenku count
function ss(){
var view_count = 0;
var donwload_count = 0;
$(".list-item .doc-view-count").each(function(){
view_count += parseInt($(this).text());
});
$(".list-item .doc-download-count").each(function(){
donwload_count += parseInt($(this).text());
});
return view_count+"\t"+donwload_count;
}
ss();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment