Well, ideally the anchor should link to a page that allows the user to complete that functionality, without requiring javascript. This is the notion of
Progressive Enhancement.
To prevent the anchor taking the user to that page when it's clicked, you can simply return false from your event handler, or use jQuery's
preventDefault() function. For example:
Code:
$('a.green-button').click(function(){
// do some stuff
return false;
});
// or....
$('a.green-button').click(function(event){
event.preventDefault();
// do some stuff
});