It sounds like this
is referring to something else than you think. In what context are you using it?
The this
keyword is usually only used within a callback function of an event-handler, when you loop over a set of elements, or similar. In that context it refers to a particular DOM-element, and can be used the way you do.
If you only want to access that particular button (outside any callback or loop) and don't have any other elements that use the btn-info
class, you could do something like:
parseInt($(".btn-info").data('votevalue'), 10);
You could also assign the element an ID, and use that to select on, which is probably a safer way, if you want to be sure that only one element match your selector.