jquery - Canceling form submit -


In the following code I tried to close the popup form which was from jquery and when I clicked no button and took action Does not submit when I click delete, it used to work before, but still when action is submitted to the container and removed, action is taken. What's wrong? How can I cancel the cancellation button popup but can not submit. Please please!

  @using (HTML.BeginForm ()) {& lt; Fieldet style = "width: 70%;" & Gt; @ Html.Hidden ("CnoType", Model.CnoType, Model) & lt; B & gt; Details: & lt; / B & gt; @ Html.DisplayFor (Desc => Model. CNoDesc) & lt; Br / & gt; & Lt; P & gt; Prefix: & lt; / P & gt; & Amp; Nbsp; & Nbsp; @html DisplayFlier (prefix = & gt; model.canfix) & lt; Br / & gt; & Lt; B & gt; Enabled & lt; / B & gt; & Amp; Nbsp; @html.checkbox ("isnabal", model.asannabel, model) & lt; / Fieldsets & gt; & Lt; Input id = "btn" type = "submit" value = "delete" /> & Lt; Button class = "off" & gt; Cancel & lt; / Button & gt; }   

This is my junkie

  & lt; Script type = "text / javascript" & gt; $ .ajaxSetup ({cache: false}); $ (Document) .ready (function () {$ (". OpenDialog") Live ("click", function (e) {e.preventDefault (); $ ("
Class = "post-text" itemprop = "text">
  $ (document) .ready (function () {$ (". Close"). Click (function () {return false; // default action (submit)}}}};   

or

  $ (document) .ready (Function () {$ (close ".") (Function (event) {event. PreventDefault (); // stops the default action (submit)}}};    

Comments