First can I say, you might want to use your own icon. Font Awesome is a very useful and easy to use icon toolkit that lets you add icons with simple CSS classes. You could use http://fontawesome.io/icon/star/ if you want :)
However, if you want to use SE's button, in Javascript, if you want to override an event handler, you need to return false;
or call event.stopPropogation()
(jQuery) at the begininng of the event handler function.
So, if you are using jQuery, to disable SE's handler:
$('.star-off, .star-on').click(function(event) {
event.stopPropogation();
//your custom handler code here
});
This makes sure the event doesn't reach the DOM so it doesn't do the original action. You'll find lots of questions on Stack Overflow relating to this if you want to find out more.