This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//E-mail Ajax validate form | |
$("#callback").validate({ | |
ignore: ":hidden", | |
rules: { | |
name: { | |
required: true, | |
minlength: 2 | |
}, | |
phone: { | |
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//mmenu | |
$("#menu").mmenu({ | |
"pageScroll": true, | |
extensions: ['fx-menu-slide','fx-listitems-fade','pagedim-white'], | |
offCanvas: { | |
position: 'right' | |
}, | |
navbar: { | |
title: 'Меню' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PageScroll2id | |
$(".nav-menu__link").mPageScroll2id({ | |
scrollSpeed : 1200, | |
autoScrollSpeed: true, | |
pageEndSmoothScroll: true | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//E-mail Ajax Send | |
$(".order-form").submit(function() { //Change | |
var th = $(this); | |
$.ajax({ | |
type: "POST", | |
url: "mail.php", //Change | |
data: th.serialize() | |
}).done(function() { | |
$.fancybox.open('<div class="message"><h2>Спасибо!</h2><p>Ваша заявка отправлена успешно!</p><p>Мы перезвоним вам через 15 минут.</p></div>'); | |
// alert("Thank you!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inputmask | |
$("input[type='tel']").mask('+7(999)999-99-99'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//equalHeights | |
function onResize() { | |
$('.classname').height('auto').equalHeights(); | |
}onResize(); | |
window.onresize = function() {onResize()}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//formname | |
$("a.callback").click(function() { | |
$("#callback .formname").val($(this).data("form")) | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//show more | |
var more = $('.more'); | |
more.hide().prev().click(function() { | |
$(this).text(more.is(':visible') ? 'Показать еще' : 'Скрыть'); | |
more.slideToggle('slow'); | |
}); |