You can try this...
$('#mybutton').live("click", function(e) {
e.preventDefault();
var post_url = get_url();
var data = ...;
do_action(post_url, data);
});
Depending on the version of jQuery you are using, you can use jQuery.live() or jQuery.on() method
When the e.preventDefault() method is called if this method is called, the default action of the event will not be triggered.
Resources:
- event.preventDefault()
- $.live()