Voting box (plus/minus, not star rating)

I'm looking for a voting script/widget (preferably jQuery), but not a star rating one, one with +1 and -1 options like this (admire my profesionnal MSPaint skills ^^) :

Anyone know about one ?

Thanks a lot !

Answers


you can do this using ajax.

Recommend you set up some ajax listener page and ping with some userID and vote (1,-1) or something along those lines.

This assumes you have a userID and login credentials etc. Or you can register it against their IP or something.

Basically:

ajaxListener.php?ID=123456&vote=1

send the ajax listener, and then have the total vote count update when the ajax is complete (have your ajax listener echo back a string of data lets say): voteTotal=10~totalVote=95

Once you read this with ajax, split it with javascript: var split1=responseText.split("~"); var voteScore=split1[0]; var voteCount=split1[1];

not tested but this should work and complete what you are thinking.

ajax: http://api.jquery.com/category/ajax/

$.ajax({ url: "ajaxTool.php?id="+idVariable, context: document.body, 
success: function(){
    $(this).addClass("done");
  }});

Need Your Help

Variable length dimension in tensor

tensorflow

I'm trying to implement the paper "End-to-End memory networks" (http://arxiv.org/abs/1503.08895)

<uses-feature> tag for AirGesture on Samsung devices

android android-manifest gesture samsung-mobile

I am making an app which should only be installed on devices having the samsung airgesture capability. If the app were to be published on the play store that is very easy i can just select those de...