/* * Copyright (c) 2021 Frenify * Author: Frenify * This file is made for CURRENT THEME */ /* @Author: Frenify @URL: https://frenify.com/ This file contains the jquery functions for the actual theme, this is the file you need to edit to change the structure of the theme. This files contents are outlined below. */ var AvovaSiteurl = fn_avova_object.siteurl; var AvovaPageLoader = jQuery('.avova_fn_pageloader'); var AvovaBody = jQuery('body'); /* Page Preloader */ var t0 = performance.now(); window.addEventListener("load", function(){ "use strict"; if(AvovaPageLoader.length){ var speed = parseFloat(AvovaPageLoader.data('speed'))*1000; var t1 = performance.now(); if(t1-t0>speed){ AvovaBody.addClass('preloader_loaded').removeClass('preloader_loading'); }else{ setTimeout(function(){AvovaBody.addClass('preloader_loaded').removeClass('preloader_loading');},speed-(t1-t0)); } } }); // All other theme functions (function ($){ "use strict"; var AvovaInit = { pageNumber: 1, init: function () { this.cursor(); this.minHeightForPages(); this.url_fixer(); this.textSkin(); this.projectCategoryFitler(); this.portfolioFilter(); this.hamburgerOpener__Mobile(); this.submenu__Mobile(); this.openShare(); this.imgToSVG(); this.dataFnBgImg(); this.estimateWidgetHeight(); this.runPlayer(); this.newPlayer(); this.right_bar_opener(); this.categoryHook(); this.right_bar_height(); this.toTopJumper(); this.like(); this.rating(); this.recipe_video(); this.search_opener(); this.search_filter(); this.fixedTotopScroll(); this.prev_next_posts(); this.widget__pages(); this.widget__archives(); this.dataFnStyle(); this.portfolioContentHeight(); this.inputCheckBoxInComment(); this.inlineStyle(); this.subscribe_form(); this.addButtonToMenu(); }, addButtonToMenu: function(){ var self = this; var element = $('.menu-item-has-children'); var count = element.length; var i = 0; element.each(function(){ $(this).children('a').append('