You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

68 lines
1.9 KiB

/**
* Created by Алексей on 10.03.2016.
*/
$(document).ready(function(){
$('input').placeholder();
$('.reviews-slides').bxSlider({
pagerCustom: '.reviews-listing',
nextText: ' ',
prevText: ' ',
onSliderLoad: function () {
$(".reviews .bx-pager.bx-default-pager").remove();
}
});
$('.scroll-top').on('click', function(e){
$('html,body').stop().animate({ scrollTop: $('.header').offset().top }, 1000);
e.preventDefault();
});
$('.popup-open-btn').click(function (e) {
e.preventDefault();
$('.overlay').fadeIn(400,
function () {
$('.popup-app')
.css('display', 'block')
.animate({opacity: 1}, 200);
});
return false;
});
$('.popup__close, .overlay').click(function () {
$('.popup')
.animate({opacity: 0}, 200,
function () {
$(this).css('display', 'none');
$('.overlay').fadeOut(400);
}
);
});
$("form.popup-form").on("submit", function(e){
console.log('11');
e.preventDefault();
var $this = $(this),
url = $this.attr("action"),
form = $this.serialize();
$.post(
url,
form,
function(data){
console.log(data);
if(data.success){
// show thanks popup
$('.popup__close').click();
$('.overlay').fadeIn(400,
function () {
$('.popup-thank')
.css('display', 'block')
.animate({opacity: 1}, 200);
});
}
}
);
})
});