Merge branch 'develop' of http://git.general-servers.com/expomap/expomap
commit
08ac07eb34
2 changed files with 34 additions and 14 deletions
@ -1,31 +1,45 @@ |
|||||||
$(document).ready(function () { |
$(document).ready(function () { |
||||||
var controller = $.superscrollorama({ |
// var controller = $.superscrollorama({
|
||||||
triggerAtCenter: true, |
// triggerAtCenter: true,
|
||||||
//playoutAnimations: true,
|
// //playoutAnimations: true,
|
||||||
reverse:false |
// reverse:false
|
||||||
}); |
// });
|
||||||
controller.addTween('#quote-strip', |
// controller.addTween('#quote-strip',
|
||||||
TweenMax.from($('#quote-strip'), .3, {css:{opacity:0}})); |
// TweenMax.from($('#quote-strip'), .3, {css:{opacity:0}}));
|
||||||
controller.addTween('#event-program-strip', |
// controller.addTween('#event-program-strip',
|
||||||
TweenMax.from($('#event-program-strip'), .5, {css:{opacity:0}})); |
// TweenMax.from($('#event-program-strip'), .5, {css:{opacity:0}}));
|
||||||
controller.addTween('#footer', |
// controller.addTween('#footer',
|
||||||
TweenMax.from($('#footer'), .5, {css:{opacity:0}})); |
// TweenMax.from($('#footer'), .5, {css:{opacity:0}}));
|
||||||
$(".modal-dialog .btn").on("click", function(){ |
$(".modal-dialog .btn").on("click", function(){ |
||||||
$(this).closest(".modal-content").find("form").submit(); |
$(this).closest(".modal-content").find("form").submit(); |
||||||
return false; |
return false; |
||||||
}) |
}) |
||||||
$("form").on("submit", function(e){ |
$("form").on("submit", function(e){ |
||||||
e.preventDefault(); |
e.preventDefault(); |
||||||
var url = $(this).attr("action"), |
var $this = $(this), |
||||||
form = $(this).serialize(); |
url = $this.attr("action"), |
||||||
|
form = $this.serialize(), |
||||||
|
$modalBody = $this.parent(), |
||||||
|
$message = $("<p class='success-message'></p>"), |
||||||
|
$button = $this.closest(".modal-dialog").find(".btn"), |
||||||
|
$loader = $(".loader",$modalBody); |
||||||
|
$loader.show(); |
||||||
$.post( |
$.post( |
||||||
url, |
url, |
||||||
form, |
form, |
||||||
function(data){ |
function(data){ |
||||||
console.log(data); |
console.log(data); |
||||||
|
|
||||||
|
if(data.message.length){ |
||||||
|
$this.fadeOut("fast",function(){ |
||||||
|
$loader.hide(); |
||||||
|
|
||||||
|
$message.text(data.message).appendTo($modalBody); |
||||||
|
}); |
||||||
|
$button.fadeOut(); |
||||||
|
} |
||||||
} |
} |
||||||
); |
); |
||||||
|
|
||||||
console.log("!!!submit"); |
|
||||||
}) |
}) |
||||||
}); |
}); |
||||||
|
|||||||
Loading…
Reference in new issue