Shaik Rilwan
Shaik Rilwan

Reputation: 355

How to stop an submit event?

I am calling a function when form is submitting.

$('#form-target').submit(function(){
    makechange();
    return false;
});

But in some case i want to stop this event.

Upvotes: 0

Views: 48

Answers (1)

DVG
DVG

Reputation: 17480

Try

$('#form-target').submit(function(event){
    event.preventDefault();
});

Upvotes: 4

Related Questions