Document.Ready seems to contradict my scripts
hi guys
I am trying to make my web page friendly, but it appears it seems to be contradicting itself.
It seems line 4 and 5 are disallowing lines 26 and 27
As I want to show a loading gif when the users records are being updated, but it fails
- $(document).ready(function () {
- $('#Main').show();
- $('#Wait').hide();
- $('#Add_Submit').on("click", function (e) {
- e.preventDefault();
-
- var last_Name = $("#First_Name").val();
- var first_Name = $("#Last_Name").val();
- var mobile = $("#Mobile").val();
- var username = $("#Username").val();
- var last_Name = $('#Add_Form input[name=First_Name]').val();
- var first_Name = $('#Add_Form input[name=Last_Name]').val();
- var token = $('#Add_Form input[name="__RequestVerificationToken"]').val();
- var form = $('#Add_Form');
-
-
-
- if ($('#Add_Form').valid()) {//Valid
-
- // $("#Add_Form :input").prop("disabled", true);
- $('#Wait').slideDown(90).show();//.html('<div class="Text-Center">Thank you <br/>Your Account has been successfully updated</div>');
- $('#Main2').slideDown(90).show().html('<div class="Text-Center">Thank you <br/>Please wait while we update your account <br/><br/><hr/><br/></div>');
- Dawn(data);
- $('#Main2').slideUp(100).html('<div class="Text-Center ">Success <br/> Thank you <br/>Your account has been updated <br/><br/><hr/><br/></div>');
- $('#Wait').hide();
- }
- else {//INVALID
- return;
- }