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