javascript - Clientside Heart Vote -
is there way implement simple heart vote(just +1 vote counter without ability vote more once) using javascript / jquery , html5 data attributes, other html5 apis, without serverside stuff?
you can use localstorage
record client has voted. this:
localstorage.setitem('voted', true);
to check if client voted before:
var voted = localstorage.get item('voted');
update:
as need counter, may try 1 of baas (backend-as-a-service) services, such parse.com or kinvey.com
Comments
Post a Comment