I'm currently working with a click event that fires an ajax call. I'd like to leverage a small plugin which, will handle some form data validation. The problem is that both the ajax call and the validation function of the plugin will be fired on the same click event.
In the end, I'd like the plugin to override the ajax function. I'm not really sure how to go about it. Any suggestions? I can't post the entire plugin, but here's a quick sample.
Ajax Call fired here:
$('p.thisClass').live('click',function() {
//Ajax Fires here
});
Plugin snippet here:
config.button.live('click', function() {
someFunction();
// Stop Other click event from firing
});
There are a few ways to look at this, but in the end, I want the plugin to take precedence over the click that fires the ajax. Any thoughts on how to accomplish this??
Thanks