From a57c0c927045528c37c05427f53199444738b7b6 Mon Sep 17 00:00:00 2001 From: zhegal Date: Wed, 3 Jan 2018 12:24:54 +0200 Subject: [PATCH] modal success styles and script --- css/modal.css | 12 ++++++++++++ js/modal.js | 10 +++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/css/modal.css b/css/modal.css index fa362b0..0f6c930 100644 --- a/css/modal.css +++ b/css/modal.css @@ -63,4 +63,16 @@ } .success_ .forms_wr_ { box-shadow: 0px 0px 35px rgba(0, 0, 0, 0.34); +} +@media(max-width:575px){ + .forms_wr_, #success-modal .forms_wr_{ + width: 100%; + left: 0; + margin: 0; + border-radius: 0; + } + #success-modal { + top: 0; + margin: 0; + } } \ No newline at end of file diff --git a/js/modal.js b/js/modal.js index 5bf048a..24b298f 100644 --- a/js/modal.js +++ b/js/modal.js @@ -27,6 +27,10 @@ $( $(this).css('display', 'none'); $('#overlay').fadeOut(400); }); + $('.success_').animate({opacity: 0, top: '0'}, 200,function(){ + $(this).css('display', 'none'); + $('#overlay').fadeOut(400); + }); $('#success_form').animate({opacity: 0, top: '0'}, 200,function(){ $(this).css('display', 'none'); $(this).css({top:'50%'}); @@ -51,9 +55,6 @@ $( $(".success_ button").click(function(){ $(".success_").removeClass("done_"); }); - $(".overlay-new").click(function(){ - $(".close").click(); - }); $("#success-modal button.btn.btn-template-primary").click(function(){ $(".close").click(); $('#success_form').animate({opacity: 0, top: '0'}, 200,function(){ @@ -65,5 +66,8 @@ $( $(this).css({top:'50%'}); }); }); + $(".overlay-new").click(function(){ + $(".close").click(); + }); } ); \ No newline at end of file -- libgit2 0.21.4