khaihihi
This commit is contained in:
1
wp-content/plugins/keydesign-addon/assets/js/index.php
Normal file
1
wp-content/plugins/keydesign-addon/assets/js/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
115
wp-content/plugins/keydesign-addon/assets/js/jquery.appear.js
Normal file
115
wp-content/plugins/keydesign-addon/assets/js/jquery.appear.js
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* jQuery.appear
|
||||
* https://github.com/bas2k/jquery.appear/
|
||||
* http://code.google.com/p/jquery-appear/
|
||||
*
|
||||
* Copyright (c) 2009 Michael Hixson
|
||||
* Copyright (c) 2012 Alexander Brovikov
|
||||
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
(function($) {
|
||||
$.fn.appear = function(fn, options) {
|
||||
var settings = $.extend({
|
||||
//arbitrary data to pass to fn
|
||||
data: undefined,
|
||||
//call fn only on the first appear?
|
||||
one: true,
|
||||
// X & Y accuracy
|
||||
accX: 0,
|
||||
accY: 0
|
||||
}, options);
|
||||
return this.each(function() {
|
||||
var t = $(this);
|
||||
//whether the element is currently visible
|
||||
t.appeared = false;
|
||||
if (!fn) {
|
||||
//trigger the custom event
|
||||
t.trigger('appear', settings.data);
|
||||
return;
|
||||
}
|
||||
var w = $(window);
|
||||
//fires the appear event when appropriate
|
||||
var check = function() {
|
||||
//is the element hidden?
|
||||
if (!t.is(':visible')) {
|
||||
//it became hidden
|
||||
t.appeared = false;
|
||||
return;
|
||||
}
|
||||
//is the element inside the visible window?
|
||||
var a = w.scrollLeft();
|
||||
var b = w.scrollTop();
|
||||
var o = t.offset();
|
||||
var x = o.left;
|
||||
var y = o.top;
|
||||
var ax = settings.accX;
|
||||
var ay = settings.accY;
|
||||
var th = t.height();
|
||||
var wh = w.height();
|
||||
var tw = t.width();
|
||||
var ww = w.width();
|
||||
if (y + th + ay >= b &&
|
||||
y <= b + wh + ay &&
|
||||
x + tw + ax >= a &&
|
||||
x <= a + ww + ax) {
|
||||
//trigger the custom event
|
||||
if (!t.appeared) t.trigger('appear', settings.data);
|
||||
} else {
|
||||
//it scrolled out of view
|
||||
t.appeared = false;
|
||||
}
|
||||
};
|
||||
//create a modified fn with some additional logic
|
||||
var modifiedFn = function() {
|
||||
//mark the element as visible
|
||||
t.appeared = true;
|
||||
//is this supposed to happen only once?
|
||||
if (settings.one) {
|
||||
//remove the check
|
||||
w.unbind('scroll', check);
|
||||
var i = $.inArray(check, $.fn.appear.checks);
|
||||
if (i >= 0) $.fn.appear.checks.splice(i, 1);
|
||||
}
|
||||
//trigger the original fn
|
||||
fn.apply(this, arguments);
|
||||
};
|
||||
//bind the modified fn to the element
|
||||
if (settings.one) t.one('appear', settings.data, modifiedFn);
|
||||
else t.bind('appear', settings.data, modifiedFn);
|
||||
//check whenever the window scrolls
|
||||
w.scroll(check);
|
||||
//check whenever the dom changes
|
||||
$.fn.appear.checks.push(check);
|
||||
//check now
|
||||
(check)();
|
||||
});
|
||||
};
|
||||
//keep a queue of appearance checks
|
||||
$.extend($.fn.appear, {
|
||||
checks: [],
|
||||
timeout: null,
|
||||
//process the queue
|
||||
checkAll: function() {
|
||||
var length = $.fn.appear.checks.length;
|
||||
if (length > 0) while (length--) ($.fn.appear.checks[length])();
|
||||
},
|
||||
//check the queue asynchronously
|
||||
run: function() {
|
||||
if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
|
||||
$.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
|
||||
}
|
||||
});
|
||||
//run checks when these methods are called
|
||||
$.each(['append', 'prepend', 'after', 'before', 'attr',
|
||||
'removeAttr', 'addClass', 'removeClass', 'toggleClass',
|
||||
'remove', 'css', 'show', 'hide'], function(i, n) {
|
||||
var old = $.fn[n];
|
||||
if (old) {
|
||||
$.fn[n] = function() {
|
||||
var r = old.apply(this, arguments);
|
||||
$.fn.appear.run();
|
||||
return r;
|
||||
};
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
235
wp-content/plugins/keydesign-addon/assets/js/jquery.countdown.js
Normal file
235
wp-content/plugins/keydesign-addon/assets/js/jquery.countdown.js
Normal file
@@ -0,0 +1,235 @@
|
||||
/*!
|
||||
* The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)
|
||||
* Copyright (c) 2015 Edson Hilios
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
(function(factory) {
|
||||
"use strict";
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define([ "jquery" ], factory);
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function($) {
|
||||
"use strict";
|
||||
var instances = [], matchers = [], defaultOptions = {
|
||||
precision: 100,
|
||||
elapse: false
|
||||
};
|
||||
matchers.push(/^[0-9]*$/.source);
|
||||
matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
|
||||
matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source);
|
||||
matchers = new RegExp(matchers.join("|"));
|
||||
function parseDateString(dateString) {
|
||||
if (dateString instanceof Date) {
|
||||
return dateString;
|
||||
}
|
||||
if (String(dateString).match(matchers)) {
|
||||
if (String(dateString).match(/^[0-9]*$/)) {
|
||||
dateString = Number(dateString);
|
||||
}
|
||||
if (String(dateString).match(/\-/)) {
|
||||
dateString = String(dateString).replace(/\-/g, "/");
|
||||
}
|
||||
return new Date(dateString);
|
||||
} else {
|
||||
throw new Error("Couldn't cast `" + dateString + "` to a date object.");
|
||||
}
|
||||
}
|
||||
var DIRECTIVE_KEY_MAP = {
|
||||
Y: "years",
|
||||
m: "months",
|
||||
n: "daysToMonth",
|
||||
w: "weeks",
|
||||
d: "daysToWeek",
|
||||
D: "totalDays",
|
||||
H: "hours",
|
||||
M: "minutes",
|
||||
S: "seconds"
|
||||
};
|
||||
function escapedRegExp(str) {
|
||||
var sanitize = str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
|
||||
return new RegExp(sanitize);
|
||||
}
|
||||
function strftime(offsetObject) {
|
||||
return function(format) {
|
||||
var directives = format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
|
||||
if (directives) {
|
||||
for (var i = 0, len = directives.length; i < len; ++i) {
|
||||
var directive = directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp = escapedRegExp(directive[0]), modifier = directive[1] || "", plural = directive[3] || "", value = null;
|
||||
directive = directive[2];
|
||||
if (DIRECTIVE_KEY_MAP.hasOwnProperty(directive)) {
|
||||
value = DIRECTIVE_KEY_MAP[directive];
|
||||
value = Number(offsetObject[value]);
|
||||
}
|
||||
if (value !== null) {
|
||||
if (modifier === "!") {
|
||||
value = pluralize(plural, value);
|
||||
}
|
||||
if (modifier === "") {
|
||||
if (value < 10) {
|
||||
value = "0" + value.toString();
|
||||
}
|
||||
}
|
||||
format = format.replace(regexp, value.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
format = format.replace(/%%/, "%");
|
||||
return format;
|
||||
};
|
||||
}
|
||||
function pluralize(format, count) {
|
||||
var plural = "s", singular = "";
|
||||
if (format) {
|
||||
format = format.replace(/(:|;|\s)/gi, "").split(/\,/);
|
||||
if (format.length === 1) {
|
||||
plural = format[0];
|
||||
} else {
|
||||
singular = format[0];
|
||||
plural = format[1];
|
||||
}
|
||||
}
|
||||
if (Math.abs(count) === 1) {
|
||||
return singular;
|
||||
} else {
|
||||
return plural;
|
||||
}
|
||||
}
|
||||
var Countdown = function(el, finalDate, options) {
|
||||
this.el = el;
|
||||
this.$el = $(el);
|
||||
this.interval = null;
|
||||
this.offset = {};
|
||||
this.options = $.extend({}, defaultOptions);
|
||||
this.instanceNumber = instances.length;
|
||||
instances.push(this);
|
||||
this.$el.data("countdown-instance", this.instanceNumber);
|
||||
if (options) {
|
||||
if (typeof options === "function") {
|
||||
this.$el.on("update.countdown", options);
|
||||
this.$el.on("stoped.countdown", options);
|
||||
this.$el.on("finish.countdown", options);
|
||||
} else {
|
||||
this.options = $.extend({}, defaultOptions, options);
|
||||
}
|
||||
}
|
||||
this.setFinalDate(finalDate);
|
||||
this.start();
|
||||
};
|
||||
$.extend(Countdown.prototype, {
|
||||
start: function() {
|
||||
if (this.interval !== null) {
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
var self = this;
|
||||
this.update();
|
||||
this.interval = setInterval(function() {
|
||||
self.update.call(self);
|
||||
}, this.options.precision);
|
||||
},
|
||||
stop: function() {
|
||||
clearInterval(this.interval);
|
||||
this.interval = null;
|
||||
this.dispatchEvent("stoped");
|
||||
},
|
||||
toggle: function() {
|
||||
if (this.interval) {
|
||||
this.stop();
|
||||
} else {
|
||||
this.start();
|
||||
}
|
||||
},
|
||||
pause: function() {
|
||||
this.stop();
|
||||
},
|
||||
resume: function() {
|
||||
this.start();
|
||||
},
|
||||
remove: function() {
|
||||
this.stop.call(this);
|
||||
instances[this.instanceNumber] = null;
|
||||
delete this.$el.data().countdownInstance;
|
||||
},
|
||||
setFinalDate: function(value) {
|
||||
this.finalDate = parseDateString(value);
|
||||
},
|
||||
update: function() {
|
||||
if (this.$el.closest("html").length === 0) {
|
||||
this.remove();
|
||||
return;
|
||||
}
|
||||
var hasEventsAttached = $._data(this.el, "events") !== undefined, now = new Date(), newTotalSecsLeft;
|
||||
newTotalSecsLeft = this.finalDate.getTime() - now.getTime();
|
||||
newTotalSecsLeft = Math.ceil(newTotalSecsLeft / 1e3);
|
||||
newTotalSecsLeft = !this.options.elapse && newTotalSecsLeft < 0 ? 0 : Math.abs(newTotalSecsLeft);
|
||||
if (this.totalSecsLeft === newTotalSecsLeft || !hasEventsAttached) {
|
||||
return;
|
||||
} else {
|
||||
this.totalSecsLeft = newTotalSecsLeft;
|
||||
}
|
||||
this.elapsed = now >= this.finalDate;
|
||||
this.offset = {
|
||||
seconds: this.totalSecsLeft % 60,
|
||||
minutes: Math.floor(this.totalSecsLeft / 60) % 60,
|
||||
hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
|
||||
days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
|
||||
daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
|
||||
daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),
|
||||
totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
|
||||
weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
|
||||
months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
|
||||
years: Math.abs(this.finalDate.getFullYear() - now.getFullYear())
|
||||
};
|
||||
if (!this.options.elapse && this.totalSecsLeft === 0) {
|
||||
this.stop();
|
||||
this.dispatchEvent("finish");
|
||||
} else {
|
||||
this.dispatchEvent("update");
|
||||
}
|
||||
},
|
||||
dispatchEvent: function(eventName) {
|
||||
var event = $.Event(eventName + ".countdown");
|
||||
event.finalDate = this.finalDate;
|
||||
event.elapsed = this.elapsed;
|
||||
event.offset = $.extend({}, this.offset);
|
||||
event.strftime = strftime(this.offset);
|
||||
this.$el.trigger(event);
|
||||
}
|
||||
});
|
||||
$.fn.countdown = function() {
|
||||
var argumentsArray = Array.prototype.slice.call(arguments, 0);
|
||||
return this.each(function() {
|
||||
var instanceNumber = $(this).data("countdown-instance");
|
||||
if (instanceNumber !== undefined) {
|
||||
var instance = instances[instanceNumber], method = argumentsArray[0];
|
||||
if (Countdown.prototype.hasOwnProperty(method)) {
|
||||
instance[method].apply(instance, argumentsArray.slice(1));
|
||||
} else if (String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i) === null) {
|
||||
instance.setFinalDate.call(instance, method);
|
||||
instance.start();
|
||||
} else {
|
||||
$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method));
|
||||
}
|
||||
} else {
|
||||
new Countdown(this, argumentsArray[0], argumentsArray[1]);
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
44
wp-content/plugins/keydesign-addon/assets/js/jquery.easing.min.js
vendored
Normal file
44
wp-content/plugins/keydesign-addon/assets/js/jquery.easing.min.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
|
||||
9
wp-content/plugins/keydesign-addon/assets/js/jquery.easypiechart.min.js
vendored
Normal file
9
wp-content/plugins/keydesign-addon/assets/js/jquery.easypiechart.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/**!
|
||||
* easyPieChart
|
||||
* Lightweight plugin to render simple, animated and retina optimized pie charts
|
||||
*
|
||||
* @license
|
||||
* @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
|
||||
* @version 2.1.5
|
||||
**/
|
||||
!function(a,b){"object"==typeof exports?module.exports=b(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],b):b(a.jQuery)}(this,function(a){var b=function(a,b){var c,d=document.createElement("canvas");a.appendChild(d),"undefined"!=typeof G_vmlCanvasManager&&G_vmlCanvasManager.initElement(d);var e=d.getContext("2d");d.width=d.height=b.size;var f=1;window.devicePixelRatio>1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(){},onStep:function(){},onStop:function(){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));e.easing="string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?jQuery.easing[e.easing]:d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}});
|
||||
450
wp-content/plugins/keydesign-addon/assets/js/jquery.easytabs.min.js
vendored
Normal file
450
wp-content/plugins/keydesign-addon/assets/js/jquery.easytabs.min.js
vendored
Normal file
@@ -0,0 +1,450 @@
|
||||
/*
|
||||
* jQuery EasyTabs plugin 3.2.0
|
||||
*
|
||||
* Copyright (c) 2010-2011 Steve Schwartz (JangoSteve)
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* Date: Thu May 09 17:30:00 2013 -0500
|
||||
*/
|
||||
|
||||
|
||||
(function(a) {
|
||||
a.easytabs = function(j, e) {
|
||||
var f = this,
|
||||
q = a(j),
|
||||
i = {
|
||||
animate: true,
|
||||
panelActiveClass: "active",
|
||||
tabActiveClass: "active",
|
||||
defaultTab: "li:first-child",
|
||||
animationSpeed: "normal",
|
||||
tabs: "> ul > li",
|
||||
updateHash: true,
|
||||
cycle: false,
|
||||
collapsible: false,
|
||||
collapsedClass: "collapsed",
|
||||
collapsedByDefault: false,
|
||||
uiTabs: false,
|
||||
transitionIn: "fadeIn",
|
||||
transitionOut: "fadeOut",
|
||||
transitionInEasing: "swing",
|
||||
transitionOutEasing: "swing",
|
||||
transitionCollapse: false,
|
||||
transitionUncollapse: false,
|
||||
transitionCollapseEasing: false,
|
||||
transitionUncollapseEasing: false,
|
||||
containerClass: "",
|
||||
tabsClass: "",
|
||||
tabClass: "",
|
||||
panelClass: "",
|
||||
cache: true,
|
||||
event: "click",
|
||||
panelContext: q
|
||||
},
|
||||
h, l, v, m, d, t = {
|
||||
fast: 200,
|
||||
normal: 300,
|
||||
slow: 600
|
||||
},
|
||||
r;
|
||||
f.init = function() {
|
||||
f.settings = r = a.extend({}, i, e);
|
||||
r.bind_str = r.event + ".easytabs";
|
||||
if (r.uiTabs) {
|
||||
r.tabActiveClass = "ui-tabs-selected";
|
||||
r.containerClass = "ui-tabs ui-widget ui-widget-content ui-corner-all";
|
||||
r.tabsClass = "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all";
|
||||
r.tabClass = "ui-state-default ui-corner-top";
|
||||
r.panelClass = "ui-tabs-panel ui-widget-content ui-corner-bottom"
|
||||
}
|
||||
if (r.collapsible && e.defaultTab !== undefined && e.collpasedByDefault === undefined) {
|
||||
r.collapsedByDefault = false
|
||||
}
|
||||
if (typeof(r.animationSpeed) === "string") {
|
||||
r.animationSpeed = t[r.animationSpeed]
|
||||
}
|
||||
a("a.anchor").remove().prependTo("body");
|
||||
q.data("easytabs", {});
|
||||
f.setTransitions();
|
||||
f.getTabs();
|
||||
b();
|
||||
g();
|
||||
w();
|
||||
n();
|
||||
c();
|
||||
q.attr("data-easytabs", true)
|
||||
};
|
||||
f.setTransitions = function() {
|
||||
v = (r.animate) ? {
|
||||
show: r.transitionIn,
|
||||
hide: r.transitionOut,
|
||||
speed: r.animationSpeed,
|
||||
collapse: r.transitionCollapse,
|
||||
uncollapse: r.transitionUncollapse,
|
||||
halfSpeed: r.animationSpeed / 2
|
||||
} : {
|
||||
show: "show",
|
||||
hide: "hide",
|
||||
speed: 0,
|
||||
collapse: "hide",
|
||||
uncollapse: "show",
|
||||
halfSpeed: 0
|
||||
}
|
||||
};
|
||||
f.getTabs = function() {
|
||||
var x;
|
||||
f.tabs = q.find(r.tabs), f.panels = a(), f.tabs.each(function() {
|
||||
var A = a(this),
|
||||
z = A.children("a"),
|
||||
y = A.children("a").data("target");
|
||||
A.data("easytabs", {});
|
||||
if (y !== undefined && y !== null) {
|
||||
A.data("easytabs").ajax = z.attr("href")
|
||||
} else {
|
||||
y = z.attr("href")
|
||||
}
|
||||
y = y.match(/#([^\?]+)/)[1];
|
||||
x = r.panelContext.find("#" + y);
|
||||
if (x.length) {
|
||||
x.data("easytabs", {
|
||||
position: x.css("position"),
|
||||
visibility: x.css("visibility")
|
||||
});
|
||||
x.not(r.panelActiveClass).hide();
|
||||
f.panels = f.panels.add(x);
|
||||
A.data("easytabs").panel = x
|
||||
} else {
|
||||
f.tabs = f.tabs.not(A);
|
||||
if ("console" in window) {
|
||||
console.warn("Warning: tab without matching panel for selector '#" + y + "' removed from set")
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
f.selectTab = function(x, C) {
|
||||
var y = window.location,
|
||||
B = y.hash.match(/^[^\?]*/)[0],
|
||||
z = x.parent().data("easytabs").panel,
|
||||
A = x.parent().data("easytabs").ajax;
|
||||
if (r.collapsible && !d && (x.hasClass(r.tabActiveClass) || x.hasClass(r.collapsedClass))) {
|
||||
f.toggleTabCollapse(x, z, A, C)
|
||||
} else {
|
||||
if (!x.hasClass(r.tabActiveClass) || !z.hasClass(r.panelActiveClass)) {
|
||||
o(x, z, A, C)
|
||||
} else {
|
||||
if (!r.cache) {
|
||||
o(x, z, A, C)
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
f.toggleTabCollapse = function(x, y, z, A) {
|
||||
f.panels.stop(true, true);
|
||||
if (u(q, "easytabs:before", [x, y, r])) {
|
||||
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
||||
if (x.hasClass(r.collapsedClass)) {
|
||||
if (z && (!r.cache || !x.parent().data("easytabs").cached)) {
|
||||
q.trigger("easytabs:ajax:beforeSend", [x, y]);
|
||||
y.load(z, function(C, B, D) {
|
||||
x.parent().data("easytabs").cached = true;
|
||||
q.trigger("easytabs:ajax:complete", [x, y, C, B, D])
|
||||
})
|
||||
}
|
||||
x.parent().removeClass(r.collapsedClass).addClass(r.tabActiveClass).children().removeClass(r.collapsedClass).addClass(r.tabActiveClass);
|
||||
y.addClass(r.panelActiveClass)[v.uncollapse](v.speed, r.transitionUncollapseEasing, function() {
|
||||
q.trigger("easytabs:midTransition", [x, y, r]);
|
||||
if (typeof A == "function") {
|
||||
A()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
x.addClass(r.collapsedClass).parent().addClass(r.collapsedClass);
|
||||
y.removeClass(r.panelActiveClass)[v.collapse](v.speed, r.transitionCollapseEasing, function() {
|
||||
q.trigger("easytabs:midTransition", [x, y, r]);
|
||||
if (typeof A == "function") {
|
||||
A()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
f.matchTab = function(x) {
|
||||
return f.tabs.find("[href='" + x + "'],[data-target='" + x + "']").first()
|
||||
};
|
||||
f.matchInPanel = function(x) {
|
||||
return (x && f.validId(x) ? f.panels.filter(":has(" + x + ")").first() : [])
|
||||
};
|
||||
f.validId = function(x) {
|
||||
return x.substr(1).match(/^[A-Za-z]+[A-Za-z0-9\-_:\.].$/)
|
||||
};
|
||||
f.selectTabFromHashChange = function() {
|
||||
var y = window.location.hash.match(/^[^\?]*/)[0],
|
||||
x = f.matchTab(y),
|
||||
z;
|
||||
if (r.updateHash) {
|
||||
if (x.length) {
|
||||
d = true;
|
||||
f.selectTab(x)
|
||||
} else {
|
||||
z = f.matchInPanel(y);
|
||||
if (z.length) {
|
||||
y = "#" + z.attr("id");
|
||||
x = f.matchTab(y);
|
||||
d = true;
|
||||
f.selectTab(x)
|
||||
} else {
|
||||
if (!h.hasClass(r.tabActiveClass) && !r.cycle) {
|
||||
if (y === "" || f.matchTab(m).length || q.closest(y).length) {
|
||||
d = true;
|
||||
f.selectTab(l)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
f.cycleTabs = function(x) {
|
||||
if (r.cycle) {
|
||||
x = x % f.tabs.length;
|
||||
$tab = a(f.tabs[x]).children("a").first();
|
||||
d = true;
|
||||
f.selectTab($tab, function() {
|
||||
setTimeout(function() {
|
||||
f.cycleTabs(x + 1)
|
||||
}, r.cycle)
|
||||
})
|
||||
}
|
||||
};
|
||||
f.publicMethods = {
|
||||
select: function(x) {
|
||||
var y;
|
||||
if ((y = f.tabs.filter(x)).length === 0) {
|
||||
if ((y = f.tabs.find("a[href='" + x + "']")).length === 0) {
|
||||
if ((y = f.tabs.find("a" + x)).length === 0) {
|
||||
if ((y = f.tabs.find("[data-target='" + x + "']")).length === 0) {
|
||||
if ((y = f.tabs.find("a[href$='" + x + "']")).length === 0) {
|
||||
a.error("Tab '" + x + "' does not exist in tab set")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
y = y.children("a").first()
|
||||
}
|
||||
f.selectTab(y)
|
||||
}
|
||||
};
|
||||
var u = function(A, x, z) {
|
||||
var y = a.Event(x);
|
||||
A.trigger(y, z);
|
||||
return y.result !== false
|
||||
};
|
||||
var b = function() {
|
||||
q.addClass(r.containerClass);
|
||||
f.tabs.parent().addClass(r.tabsClass);
|
||||
f.tabs.addClass(r.tabClass);
|
||||
f.panels.addClass(r.panelClass)
|
||||
};
|
||||
var g = function() {
|
||||
var y = window.location.hash.match(/^[^\?]*/)[0],
|
||||
x = f.matchTab(y).parent(),
|
||||
z;
|
||||
if (x.length === 1) {
|
||||
h = x;
|
||||
r.cycle = false
|
||||
} else {
|
||||
z = f.matchInPanel(y);
|
||||
if (z.length) {
|
||||
y = "#" + z.attr("id");
|
||||
h = f.matchTab(y).parent()
|
||||
} else {
|
||||
h = f.tabs.parent().find(r.defaultTab);
|
||||
if (h.length === 0) {
|
||||
a.error("The specified default tab ('" + r.defaultTab + "') could not be found in the tab set ('" + r.tabs + "') out of " + f.tabs.length + " tabs.")
|
||||
}
|
||||
}
|
||||
}
|
||||
l = h.children("a").first();
|
||||
p(x)
|
||||
};
|
||||
var p = function(z) {
|
||||
var y, x;
|
||||
if (r.collapsible && z.length === 0 && r.collapsedByDefault) {
|
||||
h.addClass(r.collapsedClass).children().addClass(r.collapsedClass)
|
||||
} else {
|
||||
y = a(h.data("easytabs").panel);
|
||||
x = h.data("easytabs").ajax;
|
||||
if (x && (!r.cache || !h.data("easytabs").cached)) {
|
||||
q.trigger("easytabs:ajax:beforeSend", [l, y]);
|
||||
y.load(x, function(B, A, C) {
|
||||
h.data("easytabs").cached = true;
|
||||
q.trigger("easytabs:ajax:complete", [l, y, B, A, C])
|
||||
})
|
||||
}
|
||||
h.data("easytabs").panel.show().addClass(r.panelActiveClass);
|
||||
h.addClass(r.tabActiveClass).children().addClass(r.tabActiveClass)
|
||||
}
|
||||
q.trigger("easytabs:initialised", [l, y])
|
||||
};
|
||||
var w = function() {
|
||||
f.tabs.children("a").bind(r.bind_str, function(x) {
|
||||
r.cycle = false;
|
||||
d = false;
|
||||
f.selectTab(a(this));
|
||||
x.preventDefault ? x.preventDefault() : x.returnValue = false
|
||||
})
|
||||
};
|
||||
var o = function(z, D, E, H) {
|
||||
f.panels.stop(true, true);
|
||||
if (u(q, "easytabs:before", [z, D, r])) {
|
||||
var A = f.panels.filter(":visible"),
|
||||
y = D.parent(),
|
||||
F, x, C, G, B = window.location.hash.match(/^[^\?]*/)[0];
|
||||
if (r.animate) {
|
||||
F = s(D);
|
||||
x = A.length ? k(A) : 0;
|
||||
C = F - x
|
||||
}
|
||||
m = B;
|
||||
G = function() {
|
||||
q.trigger("easytabs:midTransition", [z, D, r]);
|
||||
if (r.animate && r.transitionIn == "fadeIn") {
|
||||
if (C < 0) {
|
||||
y.animate({
|
||||
height: y.height() + C
|
||||
}, v.halfSpeed).css({
|
||||
"min-height": ""
|
||||
})
|
||||
}
|
||||
}
|
||||
if (r.updateHash && !d) {
|
||||
window.location.hash = "#" + D.attr("id")
|
||||
} else {
|
||||
d = false
|
||||
}
|
||||
D[v.show](v.speed, r.transitionInEasing, function() {
|
||||
y.css({
|
||||
height: "",
|
||||
"min-height": ""
|
||||
});
|
||||
q.trigger("easytabs:after", [z, D, r]);
|
||||
if (typeof H == "function") {
|
||||
H()
|
||||
}
|
||||
})
|
||||
};
|
||||
if (E && (!r.cache || !z.parent().data("easytabs").cached)) {
|
||||
q.trigger("easytabs:ajax:beforeSend", [z, D]);
|
||||
D.load(E, function(J, I, K) {
|
||||
z.parent().data("easytabs").cached = true;
|
||||
q.trigger("easytabs:ajax:complete", [z, D, J, I, K])
|
||||
})
|
||||
}
|
||||
if (r.animate && r.transitionOut == "fadeOut") {
|
||||
if (C > 0) {
|
||||
y.animate({
|
||||
height: (y.height() + C)
|
||||
}, v.halfSpeed)
|
||||
} else {
|
||||
y.css({
|
||||
"min-height": y.height()
|
||||
})
|
||||
}
|
||||
}
|
||||
f.tabs.filter("." + r.tabActiveClass).removeClass(r.tabActiveClass).children().removeClass(r.tabActiveClass);
|
||||
f.tabs.filter("." + r.collapsedClass).removeClass(r.collapsedClass).children().removeClass(r.collapsedClass);
|
||||
z.parent().addClass(r.tabActiveClass).children().addClass(r.tabActiveClass);
|
||||
f.panels.filter("." + r.panelActiveClass).removeClass(r.panelActiveClass);
|
||||
D.addClass(r.panelActiveClass);
|
||||
if (A.length) {
|
||||
A[v.hide](v.speed, r.transitionOutEasing, G)
|
||||
} else {
|
||||
D[v.uncollapse](v.speed, r.transitionUncollapseEasing, G)
|
||||
}
|
||||
}
|
||||
};
|
||||
var s = function(z) {
|
||||
if (z.data("easytabs") && z.data("easytabs").lastHeight) {
|
||||
return z.data("easytabs").lastHeight
|
||||
}
|
||||
var B = z.css("display"),
|
||||
y, x;
|
||||
try {
|
||||
y = a("<div></div>", {
|
||||
position: "absolute",
|
||||
visibility: "hidden",
|
||||
overflow: "hidden"
|
||||
})
|
||||
} catch (A) {
|
||||
y = a("<div></div>", {
|
||||
visibility: "hidden",
|
||||
overflow: "hidden"
|
||||
})
|
||||
}
|
||||
x = z.wrap(y).css({
|
||||
position: "relative",
|
||||
visibility: "hidden",
|
||||
display: "block"
|
||||
}).outerHeight();
|
||||
z.unwrap();
|
||||
z.css({
|
||||
position: z.data("easytabs").position,
|
||||
visibility: z.data("easytabs").visibility,
|
||||
display: B
|
||||
});
|
||||
z.data("easytabs").lastHeight = x;
|
||||
return x
|
||||
};
|
||||
var k = function(y) {
|
||||
var x = y.outerHeight();
|
||||
if (y.data("easytabs")) {
|
||||
y.data("easytabs").lastHeight = x
|
||||
} else {
|
||||
y.data("easytabs", {
|
||||
lastHeight: x
|
||||
})
|
||||
}
|
||||
return x
|
||||
};
|
||||
var n = function() {
|
||||
if (typeof a(window).hashchange === "function") {
|
||||
a(window).hashchange(function() {
|
||||
f.selectTabFromHashChange()
|
||||
})
|
||||
} else {
|
||||
if (a.address && typeof a.address.change === "function") {
|
||||
a.address.change(function() {
|
||||
f.selectTabFromHashChange()
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
var c = function() {
|
||||
var x;
|
||||
if (r.cycle) {
|
||||
x = f.tabs.index(h);
|
||||
setTimeout(function() {
|
||||
f.cycleTabs(x + 1)
|
||||
}, r.cycle)
|
||||
}
|
||||
};
|
||||
f.init()
|
||||
};
|
||||
a.fn.easytabs = function(c) {
|
||||
var b = arguments;
|
||||
return this.each(function() {
|
||||
var e = a(this),
|
||||
d = e.data("easytabs");
|
||||
if (undefined === d) {
|
||||
d = new a.easytabs(this, c);
|
||||
e.data("easytabs", d)
|
||||
}
|
||||
if (d.publicMethods[c]) {
|
||||
return d.publicMethods[c](Array.prototype.slice.call(b, 1))
|
||||
}
|
||||
})
|
||||
}
|
||||
})(jQuery);
|
||||
176
wp-content/plugins/keydesign-addon/assets/js/kd_addon_front.js
Normal file
176
wp-content/plugins/keydesign-addon/assets/js/kd_addon_front.js
Normal file
@@ -0,0 +1,176 @@
|
||||
;
|
||||
(function($) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// MutationSelectorObserver represents a selector and it's associated initialization callback.
|
||||
var MutationSelectorObserver = function(selector, callback) {
|
||||
this.selector = selector;
|
||||
this.callback = callback;
|
||||
};
|
||||
|
||||
// List of MutationSelectorObservers.
|
||||
var msobservers = [];
|
||||
msobservers.initialize = function(selector, callback) {
|
||||
|
||||
// Wrap the callback so that we can ensure that it is only
|
||||
// called once per element.
|
||||
var seen = [];
|
||||
var callbackOnce = function() {
|
||||
if (seen.indexOf(this) == -1) {
|
||||
seen.push(this);
|
||||
$(this).each(callback);
|
||||
}
|
||||
};
|
||||
|
||||
// See if the selector matches any elements already on the page.
|
||||
$(selector).each(callbackOnce);
|
||||
|
||||
// Then, add it to the list of selector observers.
|
||||
this.push(new MutationSelectorObserver(selector, callbackOnce));
|
||||
};
|
||||
|
||||
// The MutationObserver watches for when new elements are added to the DOM.
|
||||
var observer = new MutationObserver(function(mutations) {
|
||||
|
||||
// For each MutationSelectorObserver currently registered.
|
||||
for (var j = 0; j < msobservers.length; j++) {
|
||||
$(msobservers[j].selector).each(msobservers[j].callback);
|
||||
}
|
||||
});
|
||||
|
||||
// Observe the entire document.
|
||||
observer.observe(document.documentElement, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true
|
||||
});
|
||||
|
||||
// Deprecated API (does not work with jQuery >= 3.1.1):
|
||||
$.fn.initialize = function(callback) {
|
||||
msobservers.initialize(this.selector, callback);
|
||||
};
|
||||
$.initialize = function(selector, callback) {
|
||||
msobservers.initialize(selector, callback);
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
$(".kd_number_string").initialize(function() {
|
||||
jQuery(this).countTo();
|
||||
});
|
||||
|
||||
$(".countdown").initialize(function() {
|
||||
var text_days = $(this).attr("data-text-days");
|
||||
var text_hours = $(this).attr("data-text-hours");
|
||||
var text_minutes = $(this).attr("data-text-minutes");
|
||||
var text_seconds = $(this).attr("data-text-seconds");
|
||||
var count_year = $(this).attr("data-count-year");
|
||||
var count_month = $(this).attr("data-count-month");
|
||||
var count_day = $(this).attr("data-count-day");
|
||||
var count_date = count_year + '/' + count_month + '/' + count_day;
|
||||
$(this).countdown(count_date, function(event) {
|
||||
$(this).html(
|
||||
event.strftime('<span class="CountdownContent">%D<span class="CountdownLabel">' + text_days + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%H <span class="CountdownLabel">' + text_hours + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%M <span class="CountdownLabel">' + text_minutes + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%S <span class="CountdownLabel">' + text_seconds + '</span></span>')
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
$(".features-tabs").initialize(function() {
|
||||
$("li.tab", this).appendTo($(".tabs", this));
|
||||
$(this).easytabs({
|
||||
updateHash: false,
|
||||
animationSpeed: 'fast',
|
||||
transitionIn: 'fadeIn'
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
jQuery(".kd-text-rotator").initialize(function(index, value) {
|
||||
jQuery(this).addClass("start-rotator");
|
||||
});
|
||||
|
||||
jQuery(".kd_progress_bar").initialize(function() {
|
||||
var percent = '0.' + jQuery(this).find(".kd_progressbarfill").attr("data-value");
|
||||
var filltime = parseInt(jQuery(this).find(".kd_progressbarfill").attr("data-time"));
|
||||
var add_width = (percent * jQuery(this).find(".kd_progressbarfill").parent().width()) + 'px';
|
||||
jQuery(this).find(".kd_progressbarfill").animate({
|
||||
width: add_width
|
||||
}, {
|
||||
duration: filltime,
|
||||
queue: false
|
||||
});
|
||||
});
|
||||
|
||||
$(".kd_pie_chart .kd_chart").initialize(function() {
|
||||
$(this).easyPieChart({
|
||||
easing: "easeInQuad",
|
||||
barColor: "#000",
|
||||
trackColor: "rgba(210, 210, 210, 0.2)",
|
||||
animate: 2000,
|
||||
size: "160",
|
||||
lineCap: 'square',
|
||||
lineWidth: "3",
|
||||
scaleColor: false,
|
||||
onStep: function(from, to, percent) {
|
||||
$(this.el).find(".pc_percent").text(Math.round(percent));
|
||||
}
|
||||
});
|
||||
var chart = window.chart = $("kd_pie_chart .kd_chart").data("easyPieChart");
|
||||
});
|
||||
|
||||
|
||||
$(".feature-sections-wrapper").initialize(function() {
|
||||
$("li.nav-label", this).appendTo($(".sticky-tabs", this));
|
||||
$('.sticky-tabs li a[href*=#]').bind('click', function(e) {
|
||||
e.preventDefault();
|
||||
var target = $(this).attr("href");
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: $(target).offset().top - 136
|
||||
}, 1000, 'easeOutCubic');
|
||||
return false;
|
||||
});
|
||||
|
||||
var feature_container = $(".feature-sections-wrapper");
|
||||
var feature_nav = $(".feature-sections-tabs");
|
||||
var offset = feature_container.offset().top;
|
||||
|
||||
$(window).scroll(function(event) {
|
||||
var scroll = $(window).scrollTop();
|
||||
var total = feature_container.height() + offset - 400;
|
||||
if (scroll > total) {
|
||||
feature_nav.addClass('sticky-hide')
|
||||
}
|
||||
if (scroll < total) {
|
||||
feature_nav.removeClass('sticky-hide')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
jQuery('.mg-gallery').initialize(function() {
|
||||
var msnry = new Masonry(this, {
|
||||
itemSelector: '.mg-single-img',
|
||||
columnWidth: '.mg-sizer',
|
||||
percentPosition: true,
|
||||
gutter: 15
|
||||
});
|
||||
setInterval(function(){
|
||||
msnry.reloadItems();
|
||||
msnry.layout();
|
||||
},500);
|
||||
});
|
||||
|
||||
|
||||
jQuery('.kd_map').initialize(function() {
|
||||
var map_id = $(this).attr('id');
|
||||
setTimeout(
|
||||
function() {
|
||||
eval("initKdMap_" + map_id + "()");
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
254
wp-content/plugins/keydesign-addon/assets/js/kd_addon_script.js
Normal file
254
wp-content/plugins/keydesign-addon/assets/js/kd_addon_script.js
Normal file
@@ -0,0 +1,254 @@
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
(function($, win) {
|
||||
$.fn.inViewport = function(cb) {
|
||||
return this.each(function(i, el) {
|
||||
function visPx() {
|
||||
var H = $(this).height(),
|
||||
r = el.getBoundingClientRect(),
|
||||
t = r.top,
|
||||
b = r.bottom;
|
||||
return cb.call(el, Math.max(0, t > 0 ? H - t : (b < H ? b : H)));
|
||||
}
|
||||
visPx();
|
||||
$(win).on("resize scroll", visPx);
|
||||
});
|
||||
};
|
||||
}(jQuery, window));
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
COUNTDOWN
|
||||
------------------------------------------------------------------------*/
|
||||
$('.kd-countdown').each(function(index, value) {
|
||||
var text_days = $(this).attr("data-text-days");
|
||||
var text_hours = $(this).attr("data-text-hours");
|
||||
var text_minutes = $(this).attr("data-text-minutes");
|
||||
var text_seconds = $(this).attr("data-text-seconds");
|
||||
|
||||
var count_year = $(this).attr("data-count-year");
|
||||
var count_month = $(this).attr("data-count-month");
|
||||
var count_day = $(this).attr("data-count-day");
|
||||
var count_date = count_year + '/' + count_month + '/' + count_day;
|
||||
$(this).countdown(count_date, function(event) {
|
||||
$(this).html(
|
||||
event.strftime('<span class="CountdownContent">%D<span class="CountdownLabel">' + text_days + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%H <span class="CountdownLabel">' + text_hours + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%M <span class="CountdownLabel">' + text_minutes + '</span></span><span class="CountdownSeparator">:</span><span class="CountdownContent">%S <span class="CountdownLabel">' + text_seconds + '</span></span>')
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
PIE CHART
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
jQuery(".kd_pie_chart .kd_chart").each(function(index, value) {
|
||||
jQuery(this).appear(function() {
|
||||
jQuery(this).easyPieChart({
|
||||
easing: "easeInQuad",
|
||||
barColor: "#000",
|
||||
trackColor: "rgba(210, 210, 210, 0.2)",
|
||||
animate: 2000,
|
||||
size: "160",
|
||||
lineCap: 'square',
|
||||
lineWidth: "2",
|
||||
scaleColor: false,
|
||||
onStep: function(from, to, percent) {
|
||||
jQuery(this.el).find(".pc_percent").text(Math.round(percent));
|
||||
}
|
||||
});
|
||||
});
|
||||
var chart = window.chart = jQuery("kd_pie_chart .kd_chart").data("easyPieChart");
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
COUNTERS
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
jQuery(".kd_number_string").each(function(index, value) {
|
||||
jQuery(this).appear(function() {
|
||||
jQuery(this).countTo();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
REFRESH GOOGLE MAP WITH THE ACTIVE TAB
|
||||
------------------------------------------------------------------------*/
|
||||
if (jQuery(".contact-map-container").length) {
|
||||
jQuery('.vc_tta-tabs a').on('show.vc.tab', function() {
|
||||
setTimeout(function() {
|
||||
google.maps.event.trigger(window, 'resize', {});
|
||||
}, 500)
|
||||
});
|
||||
}
|
||||
|
||||
jQuery('.toggle-map-info').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery('.business-info-wrapper').toggleClass('minimize');
|
||||
});
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
VIDEO MODAL
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
function autoPlayYouTubeModal() {
|
||||
var trigger = $("body").find('.video-container [data-toggle="modal"]');
|
||||
trigger.click(function() {
|
||||
var theModal = $(this).data("target");
|
||||
videoSRC = $(this).data("src");
|
||||
videoSRCauto = videoSRC + "?autoplay=1";
|
||||
$(theModal + ' iframe').attr('src', videoSRCauto);
|
||||
$(theModal + ' button.close').click(function() {
|
||||
$(theModal + ' iframe').attr('src', videoSRC);
|
||||
});
|
||||
$('.modal').click(function() {
|
||||
$(theModal + ' iframe').attr('src', videoSRC);
|
||||
});
|
||||
});
|
||||
}
|
||||
autoPlayYouTubeModal();
|
||||
|
||||
function autoPlayVideoModal() {
|
||||
var trigger = $("body").find('.video-container [data-toggle="modal"]');
|
||||
trigger.click(function() {
|
||||
var theModal = $(this).data("target");
|
||||
if ($(theModal + ' .video-modal-local').length) {
|
||||
$(theModal + ' .video-modal-local')[0].play();
|
||||
}
|
||||
});
|
||||
}
|
||||
autoPlayVideoModal();
|
||||
|
||||
|
||||
$('body').on('hidden.bs.modal', '.modal', function () {
|
||||
$('video').trigger('pause');
|
||||
});
|
||||
|
||||
if (jQuery(".modal.video-modal").length > 0) {
|
||||
jQuery(".video-modal").each(function() {
|
||||
jQuery(this).insertAfter("#footer");
|
||||
});
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
FEATURE SECTIONS
|
||||
------------------------------------------------------------------------*/
|
||||
if (jQuery(".feature-sections-wrapper").length > 0) {
|
||||
jQuery('body').scrollspy({
|
||||
offset: 180,
|
||||
target: '.kd-feature-tabs'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
jQuery(window).load(function() {
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
TEXT ROTATOR
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
jQuery(".kd-text-rotator").each(function(index, value) {
|
||||
jQuery(this).appear(function() {
|
||||
jQuery(this).addClass("start-rotator");
|
||||
});
|
||||
});
|
||||
|
||||
jQuery(".kd-animated, .portfolio-item, .play-video, .toggle-map").inViewport(function(px) {
|
||||
if (px) jQuery(this).addClass("kd-animate");
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
STICKY NAVIGATION ELEMENT
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
if (jQuery(".feature-sections-wrapper").length > 0) {
|
||||
jQuery(".feature-sections-wrapper").each(function() {
|
||||
jQuery("li.nav-label", this).appendTo(jQuery(".sticky-tabs", this));
|
||||
});
|
||||
|
||||
jQuery('.sticky-tabs li a[href*=#]').bind('click', function(e) {
|
||||
e.preventDefault();
|
||||
var target = jQuery(this).attr("href");
|
||||
jQuery('html, body').stop().animate({
|
||||
scrollTop: jQuery(target).offset().top - 176
|
||||
}, 1000, 'easeOutCubic');
|
||||
return false;
|
||||
});
|
||||
|
||||
var feature_container = jQuery(".feature-sections-wrapper");
|
||||
var feature_nav = jQuery(".feature-sections-tabs");
|
||||
var offset = feature_container.offset().top;
|
||||
|
||||
jQuery(window).scroll(function(event) {
|
||||
var scroll = jQuery(window).scrollTop();
|
||||
var total = feature_container.height() + offset - 200;
|
||||
if (scroll > total) {
|
||||
feature_nav.addClass('sticky-hide')
|
||||
}
|
||||
if (scroll < total) {
|
||||
feature_nav.removeClass('sticky-hide')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery('.features-tabs').easytabs({
|
||||
updateHash: false,
|
||||
animationSpeed: 'fast',
|
||||
transitionIn: 'fadeIn'
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
MASONRY GALLERY ELEMENT
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
if (jQuery('.mg-gallery').length > 0) {
|
||||
jQuery('.mg-gallery').each(function() {
|
||||
var msnry = new Masonry(this, {
|
||||
itemSelector: '.mg-single-img',
|
||||
columnWidth: '.mg-sizer',
|
||||
percentPosition: true,
|
||||
gutter: 30
|
||||
});
|
||||
});
|
||||
var classes = '.vc_tta-tabs-list .vc_tta-tab,' + '.vc_pagination .vc_pagination-item';
|
||||
jQuery('body').on('click', classes,
|
||||
function() {
|
||||
setInterval(function(){
|
||||
var reloadMasonry = jQuery('.vc_active .mg-gallery').masonry({
|
||||
itemSelector: '.mg-single-img',
|
||||
columnWidth: '.mg-sizer',
|
||||
percentPosition: true,
|
||||
gutter: 30
|
||||
});
|
||||
reloadMasonry.masonry("reloadItems");
|
||||
reloadMasonry.masonry('layout');
|
||||
},200);
|
||||
});
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
ALERT BOX ELEMENT
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
jQuery('.kd-alertbox .ab-close').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(this).closest('.kd-alertbox').hide(200);
|
||||
});
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
LOGIN FORM
|
||||
------------------------------------------------------------------------*/
|
||||
jQuery('#user_login').attr('placeholder', 'Username');
|
||||
jQuery('#user_pass').attr('placeholder', 'Password');
|
||||
|
||||
});
|
||||
80
wp-content/plugins/keydesign-addon/assets/js/kd_countto.js
Normal file
80
wp-content/plugins/keydesign-addon/assets/js/kd_countto.js
Normal file
@@ -0,0 +1,80 @@
|
||||
(function ($) {
|
||||
$.fn.countTo = function (options) {
|
||||
options = options || {};
|
||||
|
||||
return $(this).each(function () {
|
||||
// set options for current element
|
||||
var settings = $.extend({}, $.fn.countTo.defaults, {
|
||||
from: $(this).data('from'),
|
||||
to: $(this).data('to'),
|
||||
speed: $(this).data('speed'),
|
||||
refreshInterval: $(this).data('refresh-interval'),
|
||||
decimals: $(this).data('decimals')
|
||||
}, options);
|
||||
|
||||
// how many times to update the value, and how much to increment the value on each update
|
||||
var loops = Math.ceil(settings.speed / settings.refreshInterval),
|
||||
increment = (settings.to - settings.from) / loops;
|
||||
|
||||
// references & variables that will change with each update
|
||||
var self = this,
|
||||
$self = $(this),
|
||||
loopCount = 0,
|
||||
value = settings.from,
|
||||
data = $self.data('countTo') || {};
|
||||
|
||||
$self.data('countTo', data);
|
||||
|
||||
// if an existing interval can be found, clear it first
|
||||
if (data.interval) {
|
||||
clearInterval(data.interval);
|
||||
}
|
||||
data.interval = setInterval(updateTimer, settings.refreshInterval);
|
||||
|
||||
// initialize the element with the starting value
|
||||
render(value);
|
||||
|
||||
function updateTimer() {
|
||||
value += increment;
|
||||
loopCount++;
|
||||
|
||||
render(value);
|
||||
|
||||
if (typeof(settings.onUpdate) == 'function') {
|
||||
settings.onUpdate.call(self, value);
|
||||
}
|
||||
|
||||
if (loopCount >= loops) {
|
||||
// remove the interval
|
||||
$self.removeData('countTo');
|
||||
clearInterval(data.interval);
|
||||
value = settings.to;
|
||||
|
||||
if (typeof(settings.onComplete) == 'function') {
|
||||
settings.onComplete.call(self, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function render(value) {
|
||||
var formattedValue = settings.formatter.call(self, value, settings);
|
||||
$self.text(formattedValue);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.countTo.defaults = {
|
||||
from: 0, // the number the element should start at
|
||||
to: 0, // the number the element should end at
|
||||
speed: 2000, // how long it should take to count between the target numbers
|
||||
refreshInterval: 100, // how often the element should be updated
|
||||
decimals: 0, // the number of decimal places to show
|
||||
formatter: formatter, // handler for formatting the value before rendering
|
||||
onUpdate: null, // callback method for every time the element is updated
|
||||
onComplete: null // callback method for when the element finishes updating
|
||||
};
|
||||
|
||||
function formatter(value, settings) {
|
||||
return value.toFixed(settings.decimals);
|
||||
}
|
||||
}(jQuery));
|
||||
@@ -0,0 +1,14 @@
|
||||
jQuery(document).ready(function() {
|
||||
"use strict";
|
||||
var el = jQuery(".kd_progress_bar");
|
||||
jQuery(el).each(function() {
|
||||
jQuery(this).appear(function() {
|
||||
var percent = ( jQuery(this).find(".kd_progressbarfill").attr("data-value") / 100 );
|
||||
var filltime = parseInt(jQuery(this).find(".kd_progressbarfill").attr("data-time"));
|
||||
var add_width = (percent*jQuery(this).find(".kd_progressbarfill").parent().width())+'px';
|
||||
jQuery(this).find(".kd_progressbarfill, .kd_progb_head").animate({
|
||||
width: add_width
|
||||
}, { duration: filltime, queue: false });
|
||||
});
|
||||
});
|
||||
});
|
||||
7
wp-content/plugins/keydesign-addon/assets/js/owl.carousel.min.js
vendored
Normal file
7
wp-content/plugins/keydesign-addon/assets/js/owl.carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
wp-content/plugins/keydesign-addon/assets/js/photoswipe-ui-default.min.js
vendored
Normal file
4
wp-content/plugins/keydesign-addon/assets/js/photoswipe-ui-default.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
wp-content/plugins/keydesign-addon/assets/js/photoswipe.min.js
vendored
Normal file
4
wp-content/plugins/keydesign-addon/assets/js/photoswipe.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user