Файл: Разработка сайта для парикмахерской.pdf

ВУЗ: Не указан

Категория: Курсовая работа

Дисциплина: Не указана

Добавлен: 31.03.2023

Просмотров: 839

Скачиваний: 13

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

}

}

// Портфолио

for ($sl = 0; $sl < $('.site-container .wrapper-picture-mobile').length; $sl++) {

if ($('.wrapper-picture-mobile').eq($sl).find('.port').length > 1) {

$('.wrapper-picture-mobile').eq($sl).owlCarousel({

nav: true,

items: 1,

center: true,

mouseDrag: true,

touchDrag: true,

loop: true

});

}

}

////

// Top Menu

$('.top-menu').on('click', 'li.s3-menu-allin-has > a', function(cl) {

if (isMobile) {

if (!$(this).parent().hasClass('popup_menu') && ( $(this).hasClass('s3-menu-allin-open') || $(this).parent().hasClass('s3-menu-allin-active') ) ) {

document.location.href = $(this).attr('href');

} else {

cl.preventDefault();

}

}

});

$('.top-menu').on('click', '> li.popup_menu > a', function(cls){

$body.offset().on('click touchstart', function() {

console.log(123);

});

cls.preventDefault();

});

$('.open-mobile-menu').on("click", function(){

setTimeout(function() {

$pos_m = $(window).scrollTop();

$html.css('top',-$pos_m);

$('.mobile-menu').addClass('opened');

$html.addClass('overflowHidden');

});

});

$('.close-menu').on("click", function(){

$('.mobile-menu').removeClass('opened');

$html.removeClass('overflowHidden').removeAttr('style');

$(window).scrollTop($pos_m);

});

$body.on("click touchstart", function(event){

if ($(event.target).closest(".mobile-menu").length) return;

if ($('.mobile-menu').hasClass('opened')) {

$('.mobile-menu').removeClass('opened');

$html.removeClass('overflowHidden').removeAttr('style');

$(window).scrollTop($pos_m);

}

});

// Top Menu End

// Service addClass

var indexService = 0;

$('.service-blocks .service-bl').each(function() {

indexService++;

if (indexService < 3) {

$(this).addClass("left-img");

} else if (indexService == 4) {

indexService = 0;

}

});

// Service addClass

$(window).on('resize load', function() {

if ($(this).width() > 380) {

setTimeout(function() {

$('.service-bl .body-service').height($('.service-bl .img-service img').innerHeight()-14);

});

} else {

$('.service-bl .body-service').removeAttr('style');

}

});

// POPUP FORM ///

$('.popup-form-inner .close-form').on('click', function() {

$('.popup-form-wrapper').fadeOut().removeClass('opened');

$html.removeClass('overflowHidden');

$(window).scrollTop($pos);

});

$('.button_form a').on('click', function(event) {

$pos = $(window).scrollTop();

$html.css('top',-$pos);

$('.popup-form-wrapper').fadeIn().addClass('opened').offset({top: $pos, left: 0});

$html.addClass('overflowHidden');

event.preventDefault();

});

$html.on('keyup', function(event) {

if ($('.popup-form-wrapper').hasClass('opened') && event.keyCode == 27) {

$('.popup-form-wrapper').fadeOut().removeClass('opened');

$(this).removeClass('overflowHidden').removeAttr('style');

$(window).scrollTop($pos);

}

});

$body.on('click touchstart', function(a) {

if ($(a.target).closest('.popup-form-inner').length || $(a.target).closest('.button_form a').length) return;

if ($('.popup-form-wrapper').hasClass('opened')) {

$('.popup-form-wrapper').fadeOut().removeClass('opened');

$html.removeClass('overflowHidden').css('top',-$pos).removeAttr('style');

$(window).scrollTop($pos);

}

});

// POPUP FORM ///

});

})(jQuery);

function DayClick(dayNum, obj) {

if ($(obj).hasClass('selected') && ($('.table-wrapper table tbody tr td.d' + dayNum + ' div.selected').length)) {

$('.table-wrapper table tbody tr td.d' + dayNum + ' div').removeClass('selected');

$(obj).removeClass('selected');

}

else {

$('.table-wrapper table tbody tr td.d' + dayNum + ' div').addClass('selected');

$(obj).addClass('selected');

};

}

$(document).ready(function() {