Server IP : 111.118.215.189 / Your IP : 18.220.219.93 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home1/a1673wkz/propstonerealty.com/js/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
/* ----------------- Start Document ----------------- */ (function($){ "use strict"; $(document).ready(function(){ /*--------------------------------------------------*/ /* Mobile Menu - mmenu.js /*--------------------------------------------------*/ $(function() { function mmenuInit() { var wi = $(window).width(); if(wi <= '992') { $('#footer').removeClass("sticky-footer"); $(".mmenu-init" ).remove(); $("#navigation").clone().addClass("mmenu-init").insertBefore("#navigation").removeAttr('id').removeClass('style-1 style-2').find('ul').removeAttr('id'); $(".mmenu-init").find(".container").removeClass("container"); $(".mmenu-init").mmenu({ "counters": true }, { // configuration offCanvas: { pageNodetype: "#wrapper" } }); var mmenuAPI = $(".mmenu-init").data( "mmenu" ); var $icon = $(".hamburger"); $(".mmenu-trigger").click(function() { mmenuAPI.open(); }); mmenuAPI.bind( "open:finish", function() { setTimeout(function() { $icon.addClass( "is-active" ); }); }); mmenuAPI.bind( "close:finish", function() { setTimeout(function() { $icon.removeClass( "is-active" ); }); }); } $(".mm-next").addClass("mm-fullsubopen"); } mmenuInit(); $(window).resize(function() { mmenuInit(); }); }); /* User Menu */ $('.user-menu').on('click', function(){ $(this).toggleClass('active'); }); /*----------------------------------------------------*/ /* Sticky Header /*----------------------------------------------------*/ $( "#header" ).not( "#header-container.header-style-2 #header" ).clone(true).addClass('cloned unsticky').insertAfter( "#header" ); $( "#navigation.style-2" ).clone(true).addClass('cloned unsticky').insertAfter( "#navigation.style-2" ); // Logo for header style 2 $( "#logo .sticky-logo" ).clone(true).prependTo("#navigation.style-2.cloned ul#responsive"); // sticky header script var headerOffset = $("#header-container").height() * 2; // height on which the sticky header will shows $(window).scroll(function(){ if($(window).scrollTop() >= headerOffset){ $("#header.cloned").addClass('sticky').removeClass("unsticky"); $("#navigation.style-2.cloned").addClass('sticky').removeClass("unsticky"); } else { $("#header.cloned").addClass('unsticky').removeClass("sticky"); $("#navigation.style-2.cloned").addClass('unsticky').removeClass("sticky"); } }); /*----------------------------------------------------*/ /* Tabs /*----------------------------------------------------*/ var $tabsNav = $('.tabs-nav'), $tabsNavLis = $tabsNav.children('li'); $tabsNav.each(function() { var $this = $(this); $this.next().children('.tab-content').stop(true,true).hide() .first().show(); $this.children('li').first().addClass('active').stop(true,true).show(); }); $tabsNavLis.on('click', function(e) { var $this = $(this); $this.siblings().removeClass('active').end() .addClass('active'); $this.parent().next().children('.tab-content').stop(true,true).hide() .siblings( $this.find('a').attr('href') ).fadeIn(); e.preventDefault(); }); var hash = window.location.hash; var anchor = $('.tabs-nav a[href="' + hash + '"]'); if (anchor.length === 0) { $(".tabs-nav li:first").addClass("active").show(); //Activate first tab $(".tab-content:first").show(); //Show first tab content } else { console.log(anchor); anchor.parent('li').click(); } /*----------------------------------------------------*/ /* Toggle /*----------------------------------------------------*/ $(".toggle-container").hide(); $('.trigger, .trigger.opened').on('click', function(a){ $(this).toggleClass('active'); a.preventDefault(); }); $(".trigger").on('click', function(){ $(this).next(".toggle-container").slideToggle(300); }); $(".trigger.opened").addClass("active").next(".toggle-container").show(); /*----------------------------------------------------*/ /* Panel Dropdown /*----------------------------------------------------*/ function close_panel_dropdown() { $('.panel-dropdown').removeClass("active"); $('.fs-inner-container.content').removeClass("faded-out"); } $('.panel-dropdown a').on('click', function(e) { if ( $(this).parent().is(".active") ) { close_panel_dropdown(); } else { close_panel_dropdown(); $(this).parent().addClass('active'); $('.fs-inner-container.content').addClass("faded-out"); } e.preventDefault(); }); // Apply / Close buttons $('.panel-buttons button').on('click', function(e) { $('.panel-dropdown').removeClass('active'); $('.fs-inner-container.content').removeClass("faded-out"); }); // Closes dropdown on click outside the conatainer var mouse_is_inside = false; $('.panel-dropdown').hover(function(){ mouse_is_inside=true; }, function(){ mouse_is_inside=false; }); $("body").mouseup(function(){ if(! mouse_is_inside) close_panel_dropdown(); }); // Adjusting Panel Dropdown Width $(window).on('load resize', function() { var panelTrigger = $('.booking-widget .panel-dropdown a'); $('.booking-widget .panel-dropdown .panel-dropdown-content').css({ 'width' : panelTrigger.outerWidth() }); }); // ------------------ End Document ------------------ // }); })(this.jQuery);