It sounds like this in your code is not referring to your .btn element. Try referencing it explicitly with a selector:
var votevalue = parseInt($(".btn").data('votevalue'), 10);
Also, don’t forget the radix.
It sounds like this in your code is not referring to your .btn element. Try referencing it explicitly with a selector:
var votevalue = parseInt($(".btn").data('votevalue'), 10);
Also, don’t forget the radix.