Add project files.
This commit is contained in:
11
TaxPayerFull/wwwroot/js/ScrollSmoother.min.js
vendored
Normal file
11
TaxPayerFull/wwwroot/js/ScrollSmoother.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
TaxPayerFull/wwwroot/js/ScrollTrigger.min.js
vendored
Normal file
11
TaxPayerFull/wwwroot/js/ScrollTrigger.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
48
TaxPayerFull/wwwroot/js/ajax-form.js
Normal file
48
TaxPayerFull/wwwroot/js/ajax-form.js
Normal file
@@ -0,0 +1,48 @@
|
||||
$(function() {
|
||||
|
||||
// Get the form.
|
||||
var form = $('#contact-form');
|
||||
|
||||
// Get the messages div.
|
||||
var formMessages = $('.ajax-response');
|
||||
|
||||
// Set up an event listener for the contact form.
|
||||
$(form).submit(function(e) {
|
||||
// Stop the browser from submitting the form.
|
||||
e.preventDefault();
|
||||
|
||||
// Serialize the form data.
|
||||
var formData = $(form).serialize();
|
||||
|
||||
// Submit the form using AJAX.
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: $(form).attr('action'),
|
||||
data: formData
|
||||
})
|
||||
.done(function(response) {
|
||||
// Make sure that the formMessages div has the 'success' class.
|
||||
$(formMessages).removeClass('error');
|
||||
$(formMessages).addClass('success');
|
||||
|
||||
// Set the message text.
|
||||
$(formMessages).text(response);
|
||||
|
||||
// Clear the form.
|
||||
$('#contact-form input,#contact-form textarea').val('');
|
||||
})
|
||||
.fail(function(data) {
|
||||
// Make sure that the formMessages div has the 'error' class.
|
||||
$(formMessages).removeClass('success');
|
||||
$(formMessages).addClass('error');
|
||||
|
||||
// Set the message text.
|
||||
if (data.responseText !== '') {
|
||||
$(formMessages).text(data.responseText);
|
||||
} else {
|
||||
$(formMessages).text('Oops! An error occured and your message could not be sent.');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
6
TaxPayerFull/wwwroot/js/bootstrap.bundle.min.js
vendored
Normal file
6
TaxPayerFull/wwwroot/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
TaxPayerFull/wwwroot/js/counterup.js
Normal file
8
TaxPayerFull/wwwroot/js/counterup.js
Normal file
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* jquery.counterup.js 1.0
|
||||
*
|
||||
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
|
||||
* Released under the GPL v2 License
|
||||
*
|
||||
* Date: Nov 26, 2013
|
||||
*/(function(e){"use strict";e.fn.counterUp=function(t){var n=e.extend({time:400,delay:10},t);return this.each(function(){var t=e(this),r=n,i=function(){var e=[],n=r.time/r.delay,i=t.text(),s=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");var o=/^[0-9]+$/.test(i),u=/^[0-9]+\.[0-9]+$/.test(i),a=u?(i.split(".")[1]||[]).length:0;for(var f=n;f>=1;f--){var l=parseInt(i/n*f);u&&(l=parseFloat(i/n*f).toFixed(a));if(s)while(/(\d+)(\d{3})/.test(l.toString()))l=l.toString().replace(/(\d+)(\d{3})/,"$1,$2");e.unshift(l)}t.data("counterup-nums",e);t.text("0");var c=function(){t.text(t.data("counterup-nums").shift());if(t.data("counterup-nums").length)setTimeout(t.data("counterup-func"),r.delay);else{delete t.data("counterup-nums");t.data("counterup-nums",null);t.data("counterup-func",null)}};t.data("counterup-func",c);setTimeout(t.data("counterup-func"),r.delay)};t.waypoint(i,{offset:"100%",triggerOnce:!0})})}})(jQuery);
|
11
TaxPayerFull/wwwroot/js/gsap.min.js
vendored
Normal file
11
TaxPayerFull/wwwroot/js/gsap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
TaxPayerFull/wwwroot/js/imagesloaded-pkgd.js
Normal file
7
TaxPayerFull/wwwroot/js/imagesloaded-pkgd.js
Normal file
File diff suppressed because one or more lines are too long
12
TaxPayerFull/wwwroot/js/isotope-pkgd.js
Normal file
12
TaxPayerFull/wwwroot/js/isotope-pkgd.js
Normal file
File diff suppressed because one or more lines are too long
381
TaxPayerFull/wwwroot/js/jarallax.js
Normal file
381
TaxPayerFull/wwwroot/js/jarallax.js
Normal file
@@ -0,0 +1,381 @@
|
||||
/*!
|
||||
* Name : Just Another Parallax [Jarallax]
|
||||
* Version : 1.0.0
|
||||
* Author : _nK http://nkdev.info
|
||||
* GitHub : https://github.com/nk-o/jarallax
|
||||
*/
|
||||
(function(factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function($) {
|
||||
// Adapted from https://gist.github.com/paulirish/1579671
|
||||
if (!Date.now)
|
||||
Date.now = function() { return new Date().getTime(); };
|
||||
if(!window.requestAnimationFrame)
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var vendors = ['webkit', 'moz'];
|
||||
for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
|
||||
var vp = vendors[i];
|
||||
window.requestAnimationFrame = window[vp+'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = (window[vp+'CancelAnimationFrame']
|
||||
|| window[vp+'CancelRequestAnimationFrame']);
|
||||
}
|
||||
if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) // iOS6 is buggy
|
||||
|| !window.requestAnimationFrame || !window.cancelAnimationFrame) {
|
||||
var lastTime = 0;
|
||||
window.requestAnimationFrame = function(callback) {
|
||||
var now = Date.now();
|
||||
var nextTime = Math.max(lastTime + 16, now);
|
||||
return setTimeout(function() { callback(lastTime = nextTime); },
|
||||
nextTime - now);
|
||||
};
|
||||
window.cancelAnimationFrame = clearTimeout;
|
||||
}
|
||||
}());
|
||||
|
||||
var supportTransform = (function() {
|
||||
var prefixes = 'transform WebkitTransform MozTransform OTransform msTransform'.split(' ');
|
||||
var div = document.createElement('div');
|
||||
for(var i = 0; i < prefixes.length; i++) {
|
||||
if(div && div.style[prefixes[i]] !== undefined) {
|
||||
return prefixes[i];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}());
|
||||
|
||||
var support3dtransform = (function() {
|
||||
if (!window.getComputedStyle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var el = document.createElement('p'),
|
||||
has3d,
|
||||
transforms = {
|
||||
'webkitTransform':'-webkit-transform',
|
||||
'OTransform':'-o-transform',
|
||||
'msTransform':'-ms-transform',
|
||||
'MozTransform':'-moz-transform',
|
||||
'transform':'transform'
|
||||
};
|
||||
|
||||
// Add it to the body to get the computed style.
|
||||
(document.body || document.documentElement).insertBefore(el, null);
|
||||
|
||||
for (var t in transforms) {
|
||||
if (el.style[t] !== undefined) {
|
||||
el.style[t] = "translate3d(1px,1px,1px)";
|
||||
has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);
|
||||
}
|
||||
}
|
||||
|
||||
(document.body || document.documentElement).removeChild(el);
|
||||
|
||||
return (has3d !== undefined && has3d.length > 0 && has3d !== "none");
|
||||
}());
|
||||
|
||||
|
||||
// Jarallax instance
|
||||
var Jarallax = (function() {
|
||||
var instanceID = 0;
|
||||
|
||||
function Jarallax(item, userOptions) {
|
||||
var _this = this,
|
||||
dataOptions;
|
||||
|
||||
_this.$item = $(item);
|
||||
|
||||
_this.defaults = {
|
||||
speed : 0.5,
|
||||
imgSrc : null,
|
||||
imgWidth : null,
|
||||
imgHeight : null,
|
||||
enableTransform : true,
|
||||
zIndex : -100
|
||||
};
|
||||
dataOptions = _this.$item.data('jarallax') || {};
|
||||
_this.options = $.extend({}, _this.defaults, dataOptions, userOptions);
|
||||
|
||||
// fix speed option [0.0, 1.0]
|
||||
_this.options.speed = Math.min(1, Math.max(0, parseFloat(_this.options.speed)));
|
||||
|
||||
_this.instanceID = instanceID++;
|
||||
|
||||
_this.image = {
|
||||
src : _this.options.imgSrc || null,
|
||||
$container : null,
|
||||
$item : null,
|
||||
width : _this.options.imgWidth || null,
|
||||
height : _this.options.imgHeight || null
|
||||
}
|
||||
|
||||
if(_this.initImg()) {
|
||||
_this.initEvents();
|
||||
|
||||
_this.init();
|
||||
}
|
||||
}
|
||||
|
||||
return Jarallax;
|
||||
}());
|
||||
|
||||
Jarallax.prototype.initImg = function() {
|
||||
var _this = this;
|
||||
|
||||
// get image src
|
||||
if(_this.image.src === null) {
|
||||
_this.image.src = _this.$item.css('background-image').replace(/^url\(['"]?/g,'').replace(/['"]?\)$/g,'');
|
||||
}
|
||||
if(!_this.image.src || _this.image.src === 'none') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Jarallax.prototype.init = function() {
|
||||
var _this = this;
|
||||
|
||||
// container for parallax image
|
||||
_this.image.$container = $('<div>')
|
||||
.css({
|
||||
position : 'absolute',
|
||||
top : 0,
|
||||
left : 0,
|
||||
width : '100%',
|
||||
height : '100%',
|
||||
overflow : 'hidden',
|
||||
'pointer-events' : 'none',
|
||||
'transition' : 'transform linear -1ms, -webkit-transform linear -1ms'
|
||||
})
|
||||
.prependTo(_this.$item);
|
||||
|
||||
// item with background image (this will be moved to create parallax effect)
|
||||
_this.image.$item = _this.image.$container.clone()
|
||||
.css({
|
||||
position : 'fixed',
|
||||
'pointer-events' : 'none',
|
||||
'background-position' : '50% 50%',
|
||||
'background-repeat' : 'no-repeat no-repeat',
|
||||
'background-image' : 'url(' + _this.image.src + ')'
|
||||
})
|
||||
.prependTo(_this.image.$container);
|
||||
|
||||
// insert to item
|
||||
_this.image.$container
|
||||
.css({
|
||||
visibility : 'hidden',
|
||||
'z-index' : _this.options.zIndex
|
||||
})
|
||||
.attr('id', 'jarallax-container-' + _this.instanceID)
|
||||
.prependTo(_this.$item)
|
||||
|
||||
// cover image and init parallax position after image load
|
||||
_this.getImageSize(_this.image.src, function(width, height) {
|
||||
_this.image.width = width;
|
||||
_this.image.height = height;
|
||||
|
||||
window.requestAnimationFrame($.proxy(_this.coverImage, _this));
|
||||
window.requestAnimationFrame($.proxy(_this.clipContainer, _this));
|
||||
window.requestAnimationFrame($.proxy(_this.onScroll, _this));
|
||||
|
||||
// remove default user background
|
||||
_this.$item.data('JarallaxOriginalStyles', _this.$item.attr('style'));
|
||||
|
||||
// timeout to fix IE blinking
|
||||
setTimeout(function() {
|
||||
_this.$item.css({
|
||||
'background-image' : 'none',
|
||||
'background-attachment' : 'scroll',
|
||||
'background-size' : 'auto'
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
};
|
||||
|
||||
Jarallax.prototype.initEvents = function() {
|
||||
var _this = this;
|
||||
|
||||
$(window).on('scroll.jarallax.jarallax-' + _this.instanceID, function() {
|
||||
window.requestAnimationFrame($.proxy(_this.onScroll, _this));
|
||||
});
|
||||
|
||||
var timeout;
|
||||
$(window).on('resize.jarallax.jarallax-' + _this.instanceID + ' load.jarallax.jarallax-' + _this.instanceID + '', function() {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(function() {
|
||||
window.requestAnimationFrame(function() {
|
||||
_this.coverImage();
|
||||
_this.clipContainer();
|
||||
_this.onScroll();
|
||||
});
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
Jarallax.prototype.destroy = function() {
|
||||
var _this = this;
|
||||
|
||||
// remove additional styles for clip
|
||||
$('head #jarallax-clip-' + _this.instanceID).remove();
|
||||
|
||||
$(window).off('.jarallax-' + _this.instanceID);
|
||||
|
||||
_this.$item.attr('style', _this.$item.data('JarallaxOriginalStyles'));
|
||||
_this.$item.removeData('JarallaxOriginalStyles');
|
||||
|
||||
_this.image.$container.remove();
|
||||
|
||||
delete _this.$item[0].jarallax;
|
||||
}
|
||||
|
||||
Jarallax.prototype.getImageSize = function(src, callback) {
|
||||
if(!src || !callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var tempImg = new Image();
|
||||
tempImg.onload = function() {
|
||||
callback(tempImg.width, tempImg.height)
|
||||
}
|
||||
tempImg.src = src;
|
||||
}
|
||||
|
||||
// it will remove some image overlapping
|
||||
// overlapping occur due to an image position fixed inside absolute possition element (webkit based browsers works without any fix)
|
||||
Jarallax.prototype.clipContainer = function() {
|
||||
var _this = this,
|
||||
width = _this.image.$container.outerWidth(true),
|
||||
height = _this.image.$container.outerHeight(true);
|
||||
|
||||
var $styles = $('head #jarallax-clip-' + _this.instanceID);
|
||||
if(!$styles.length) {
|
||||
$('head').append('<style type="text/css" id="jarallax-clip-' + _this.instanceID + '"></style>');
|
||||
$styles = $('head #jarallax-clip-' + _this.instanceID);
|
||||
}
|
||||
|
||||
var css = [
|
||||
'#jarallax-container-' + _this.instanceID + ' {',
|
||||
' clip: rect(0px ' + width + 'px ' + height + 'px 0);',
|
||||
' clip: rect(0px, ' + width + 'px, ' + height + 'px, 0);',
|
||||
'}'
|
||||
].join('\n');
|
||||
|
||||
// add clip styles inline (this method need for support IE8 and less browsers)
|
||||
if ($styles[0].styleSheet) {
|
||||
$styles[0].styleSheet.cssText = css;
|
||||
} else {
|
||||
$styles.html(css);
|
||||
}
|
||||
}
|
||||
|
||||
Jarallax.prototype.coverImage = function() {
|
||||
var _this = this;
|
||||
|
||||
if(!_this.image.width || !_this.image.height) {
|
||||
return;
|
||||
}
|
||||
|
||||
var contW = _this.image.$container.outerWidth(true),
|
||||
contH = _this.image.$container.outerHeight(true),
|
||||
wndW = $(window).outerWidth(true),
|
||||
whdH = $(window).outerHeight(true),
|
||||
imgW = _this.image.width,
|
||||
imgH = _this.image.height;
|
||||
|
||||
var css = {
|
||||
width : Math.max(wndW, contW) * Math.max(_this.options.speed, 1),
|
||||
height : Math.max(whdH, contH) * Math.max(_this.options.speed, 1)
|
||||
};
|
||||
|
||||
// cover by width
|
||||
if(css.width / css.height > imgW / imgH) {
|
||||
var h = css.width * imgH / imgW;
|
||||
css.backgroundSize = css.width + 'px ' + h + 'px';
|
||||
}
|
||||
|
||||
// cover by height
|
||||
else {
|
||||
var w = css.height * imgW / imgH;
|
||||
css.backgroundSize = w + 'px ' + css.height + 'px';
|
||||
}
|
||||
|
||||
_this.image.$item.css(css);
|
||||
};
|
||||
|
||||
Jarallax.prototype.onScroll = function() {
|
||||
var _this = this;
|
||||
|
||||
if(!_this.image.width || !_this.image.height) {
|
||||
return;
|
||||
}
|
||||
|
||||
var scrollTop = $(window).scrollTop(),
|
||||
wndHeight = $(window).height(),
|
||||
// starting position of each element to have parallax applied to it
|
||||
sectionTop = _this.$item.offset().top,
|
||||
sectionHeight = _this.$item.outerHeight(true),
|
||||
css = {
|
||||
visibility : 'visible',
|
||||
backgroundPosition : '50% 50%'
|
||||
};
|
||||
|
||||
// Check if totally above or totally below viewport
|
||||
if (sectionTop + sectionHeight < scrollTop || sectionTop > scrollTop + wndHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
// calculate parallax
|
||||
var position = - (scrollTop - sectionTop) * _this.options.speed;
|
||||
|
||||
if(supportTransform && _this.options.enableTransform) {
|
||||
css.transform = 'translateY(' + position + 'px)';
|
||||
if(support3dtransform) {
|
||||
css.transform = 'translate3d(0, ' + position + 'px, 0)';
|
||||
}
|
||||
} else {
|
||||
css.backgroundPosition = '50% ' + Math.round(position) + 'px';
|
||||
}
|
||||
|
||||
_this.image.$item.css(css);
|
||||
}
|
||||
|
||||
var oldJarallax = $.fn.jarallax;
|
||||
|
||||
$.fn.jarallax = function() {
|
||||
var items = this,
|
||||
options = arguments[0],
|
||||
args = Array.prototype.slice.call(arguments, 1),
|
||||
len = items.length,
|
||||
k = 0,
|
||||
ret;
|
||||
|
||||
for (k; k < len; k++) {
|
||||
if (typeof options === 'object' || typeof options === 'undefined')
|
||||
items[k].jarallax = new Jarallax(items[k], options);
|
||||
else
|
||||
ret = items[k].jarallax[options].apply(items[k].jarallax, args);
|
||||
if (typeof ret !== 'undefined') return ret;
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
// no conflict
|
||||
$.fn.jarallax.noConflict = function () {
|
||||
$.fn.jarallax = oldJarallax;
|
||||
return this;
|
||||
};
|
||||
|
||||
// data-jarallax initialization
|
||||
$(document).on('ready.data-jarallax', function () {
|
||||
$('[data-jarallax]').jarallax();
|
||||
});
|
||||
}));
|
2
TaxPayerFull/wwwroot/js/jquery.js
vendored
Normal file
2
TaxPayerFull/wwwroot/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
TaxPayerFull/wwwroot/js/magnific-popup.js
Normal file
4
TaxPayerFull/wwwroot/js/magnific-popup.js
Normal file
File diff suppressed because one or more lines are too long
1371
TaxPayerFull/wwwroot/js/main.js
Normal file
1371
TaxPayerFull/wwwroot/js/main.js
Normal file
File diff suppressed because it is too large
Load Diff
282
TaxPayerFull/wwwroot/js/meanmenu.js
Normal file
282
TaxPayerFull/wwwroot/js/meanmenu.js
Normal file
@@ -0,0 +1,282 @@
|
||||
/*!
|
||||
* jQuery meanMenu v2.0.8
|
||||
* @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu)
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
|
||||
* HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR
|
||||
* FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE
|
||||
* OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
|
||||
* COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.COPYRIGHT HOLDERS WILL NOT
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
|
||||
* DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://gnu.org/licenses/>.
|
||||
*
|
||||
* Find more information at http://www.meanthemes.com/plugins/meanmenu/
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$.fn.meanmenu = function (options) {
|
||||
var defaults = {
|
||||
meanMenuTarget: jQuery(this), // Target the current HTML markup you wish to replace
|
||||
meanMenuContainer: 'body', // Choose where meanmenu will be placed within the HTML
|
||||
meanMenuClose: "X", // single character you want to represent the close menu button
|
||||
meanMenuCloseSize: "18px", // set font size of close button
|
||||
meanMenuOpen: "<span /><span /><span />", // text/markup you want when menu is closed
|
||||
meanRevealPosition: "right", // left right or center positions
|
||||
meanRevealPositionDistance: "0", // Tweak the position of the menu
|
||||
meanRevealColour: "", // override CSS colours for the reveal background
|
||||
meanScreenWidth: "480", // set the screen width you want meanmenu to kick in at
|
||||
meanNavPush: "", // set a height here in px, em or % if you want to budge your layout now the navigation is missing.
|
||||
meanShowChildren: true, // true to show children in the menu, false to hide them
|
||||
meanExpandableChildren: true, // true to allow expand/collapse children
|
||||
meanRemoveAttrs: false, // true to remove classes and IDs, false to keep them
|
||||
onePage: false, // set to true for one page sites
|
||||
meanDisplay: "block", // override display method for table cell based layouts e.g. table-cell
|
||||
removeElements: "" // set to hide page elements
|
||||
};
|
||||
options = $.extend(defaults, options);
|
||||
|
||||
// get browser width
|
||||
var currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
|
||||
return this.each(function () {
|
||||
var meanMenu = options.meanMenuTarget;
|
||||
var meanContainer = options.meanMenuContainer;
|
||||
var meanMenuClose = options.meanMenuClose;
|
||||
var meanMenuCloseSize = options.meanMenuCloseSize;
|
||||
var meanMenuOpen = options.meanMenuOpen;
|
||||
var meanRevealPosition = options.meanRevealPosition;
|
||||
var meanRevealPositionDistance = options.meanRevealPositionDistance;
|
||||
var meanRevealColour = options.meanRevealColour;
|
||||
var meanScreenWidth = options.meanScreenWidth;
|
||||
var meanNavPush = options.meanNavPush;
|
||||
var meanRevealClass = ".meanmenu-reveal";
|
||||
var meanShowChildren = options.meanShowChildren;
|
||||
var meanExpandableChildren = options.meanExpandableChildren;
|
||||
var meanExpand = options.meanExpand;
|
||||
var meanRemoveAttrs = options.meanRemoveAttrs;
|
||||
var onePage = options.onePage;
|
||||
var meanDisplay = options.meanDisplay;
|
||||
var removeElements = options.removeElements;
|
||||
|
||||
//detect known mobile/tablet usage
|
||||
var isMobile = false;
|
||||
if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i)) ) {
|
||||
isMobile = true;
|
||||
}
|
||||
|
||||
if ( (navigator.userAgent.match(/MSIE 8/i)) || (navigator.userAgent.match(/MSIE 7/i)) ) {
|
||||
// add scrollbar for IE7 & 8 to stop breaking resize function on small content sites
|
||||
jQuery('html').css("overflow-y" , "scroll");
|
||||
}
|
||||
|
||||
var meanRevealPos = "";
|
||||
var meanCentered = function() {
|
||||
if (meanRevealPosition === "center") {
|
||||
var newWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
var meanCenter = ( (newWidth/2)-22 )+"px";
|
||||
meanRevealPos = "left:" + meanCenter + ";right:auto;";
|
||||
|
||||
if (!isMobile) {
|
||||
jQuery('.meanmenu-reveal').css("left",meanCenter);
|
||||
} else {
|
||||
jQuery('.meanmenu-reveal').animate({
|
||||
left: meanCenter
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var menuOn = false;
|
||||
var meanMenuExist = false;
|
||||
|
||||
|
||||
if (meanRevealPosition === "right") {
|
||||
meanRevealPos = "right:" + meanRevealPositionDistance + ";left:auto;";
|
||||
}
|
||||
if (meanRevealPosition === "left") {
|
||||
meanRevealPos = "left:" + meanRevealPositionDistance + ";right:auto;";
|
||||
}
|
||||
// run center function
|
||||
meanCentered();
|
||||
|
||||
// set all styles for mean-reveal
|
||||
var $navreveal = "";
|
||||
|
||||
var meanInner = function() {
|
||||
// get last class name
|
||||
if (jQuery($navreveal).is(".meanmenu-reveal.meanclose")) {
|
||||
$navreveal.html(meanMenuClose);
|
||||
} else {
|
||||
$navreveal.html(meanMenuOpen);
|
||||
}
|
||||
};
|
||||
|
||||
// re-instate original nav (and call this on window.width functions)
|
||||
var meanOriginal = function() {
|
||||
jQuery('.mean-bar,.mean-push').remove();
|
||||
jQuery(meanContainer).removeClass("mean-container");
|
||||
jQuery(meanMenu).css('display', meanDisplay);
|
||||
menuOn = false;
|
||||
meanMenuExist = false;
|
||||
jQuery(removeElements).removeClass('mean-remove');
|
||||
};
|
||||
|
||||
// navigation reveal
|
||||
var showMeanMenu = function() {
|
||||
var meanStyles = "background:"+meanRevealColour+";color:"+meanRevealColour+";"+meanRevealPos;
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
jQuery(removeElements).addClass('mean-remove');
|
||||
meanMenuExist = true;
|
||||
// add class to body so we don't need to worry about media queries here, all CSS is wrapped in '.mean-container'
|
||||
jQuery(meanContainer).addClass("mean-container");
|
||||
jQuery('.mean-container').prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+meanStyles+'">Show Navigation</a><nav class="mean-nav"></nav></div>');
|
||||
|
||||
//push meanMenu navigation into .mean-nav
|
||||
var meanMenuContents = jQuery(meanMenu).html();
|
||||
jQuery('.mean-nav').html(meanMenuContents);
|
||||
|
||||
// remove all classes from EVERYTHING inside meanmenu nav
|
||||
if(meanRemoveAttrs) {
|
||||
jQuery('nav.mean-nav ul, nav.mean-nav ul *').each(function() {
|
||||
// First check if this has mean-remove class
|
||||
if (jQuery(this).is('.mean-remove')) {
|
||||
jQuery(this).attr('class', 'mean-remove');
|
||||
} else {
|
||||
jQuery(this).removeAttr("class");
|
||||
}
|
||||
jQuery(this).removeAttr("id");
|
||||
});
|
||||
}
|
||||
|
||||
// push in a holder div (this can be used if removal of nav is causing layout issues)
|
||||
jQuery(meanMenu).before('<div class="mean-push" />');
|
||||
jQuery('.mean-push').css("margin-top",meanNavPush);
|
||||
|
||||
// hide current navigation and reveal mean nav link
|
||||
jQuery(meanMenu).hide();
|
||||
jQuery(".meanmenu-reveal").show();
|
||||
|
||||
// turn 'X' on or off
|
||||
jQuery(meanRevealClass).html(meanMenuOpen);
|
||||
$navreveal = jQuery(meanRevealClass);
|
||||
|
||||
//hide mean-nav ul
|
||||
jQuery('.mean-nav ul').hide();
|
||||
|
||||
// hide sub nav
|
||||
if(meanShowChildren) {
|
||||
// allow expandable sub nav(s)
|
||||
if(meanExpandableChildren){
|
||||
jQuery('.mean-nav ul ul').each(function() {
|
||||
if(jQuery(this).children().length){
|
||||
jQuery(this,'li:first').parent().append('<a class="mean-expand" href="#" style="font-size: '+ meanMenuCloseSize +'">'+ meanExpand +'</a>');
|
||||
}
|
||||
});
|
||||
jQuery('.mean-expand').on("click",function(e){
|
||||
e.preventDefault();
|
||||
if (jQuery(this).hasClass("mean-clicked")) {
|
||||
jQuery(this).prev('ul').slideUp(300, function(){});
|
||||
jQuery(this).parent().removeClass('dropdown-opened');
|
||||
} else {
|
||||
jQuery(this).prev('ul').slideDown(300, function(){});
|
||||
jQuery(this).parent().addClass('dropdown-opened');
|
||||
}
|
||||
jQuery(this).toggleClass("mean-clicked");
|
||||
});
|
||||
} else {
|
||||
jQuery('.mean-nav ul ul').show();
|
||||
}
|
||||
} else {
|
||||
jQuery('.mean-nav ul ul').hide();
|
||||
}
|
||||
|
||||
// add last class to tidy up borders
|
||||
jQuery('.mean-nav ul li').last().addClass('mean-last');
|
||||
$navreveal.removeClass("meanclose");
|
||||
jQuery($navreveal).click(function(e){
|
||||
e.preventDefault();
|
||||
if( menuOn === false ) {
|
||||
$navreveal.css("text-align", "center");
|
||||
$navreveal.css("text-indent", "0");
|
||||
$navreveal.css("font-size", meanMenuCloseSize);
|
||||
jQuery('.mean-nav ul:first').slideDown();
|
||||
menuOn = true;
|
||||
} else {
|
||||
jQuery('.mean-nav ul:first').slideUp();
|
||||
menuOn = false;
|
||||
}
|
||||
$navreveal.toggleClass("meanclose");
|
||||
meanInner();
|
||||
jQuery(removeElements).addClass('mean-remove');
|
||||
});
|
||||
|
||||
// for one page websites, reset all variables...
|
||||
if ( onePage ) {
|
||||
jQuery('.mean-nav ul > li > a:first-child').on( "click" , function () {
|
||||
jQuery('.mean-nav ul:first').slideUp();
|
||||
menuOn = false;
|
||||
jQuery($navreveal).toggleClass("meanclose").html(meanMenuOpen);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
};
|
||||
|
||||
if (!isMobile) {
|
||||
// reset menu on resize above meanScreenWidth
|
||||
jQuery(window).resize(function () {
|
||||
currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
if (currentWidth > meanScreenWidth) {
|
||||
meanOriginal();
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
showMeanMenu();
|
||||
meanCentered();
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(window).resize(function () {
|
||||
// get browser width
|
||||
currentWidth = window.innerWidth || document.documentElement.clientWidth;
|
||||
|
||||
if (!isMobile) {
|
||||
meanOriginal();
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
showMeanMenu();
|
||||
meanCentered();
|
||||
}
|
||||
} else {
|
||||
meanCentered();
|
||||
if (currentWidth <= meanScreenWidth) {
|
||||
if (meanMenuExist === false) {
|
||||
showMeanMenu();
|
||||
}
|
||||
} else {
|
||||
meanOriginal();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// run main menuMenu function on load
|
||||
showMeanMenu();
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
4
TaxPayerFull/wwwroot/js/nice-select.js
Normal file
4
TaxPayerFull/wwwroot/js/nice-select.js
Normal file
@@ -0,0 +1,4 @@
|
||||
/* jQuery Nice Select - v1.0
|
||||
https://github.com/hernansartorio/jquery-nice-select
|
||||
Made by Hernán Sartorio */
|
||||
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
|
185
TaxPayerFull/wwwroot/js/parallax-scroll.js
Normal file
185
TaxPayerFull/wwwroot/js/parallax-scroll.js
Normal file
@@ -0,0 +1,185 @@
|
||||
$(function() {
|
||||
ParallaxScroll.init();
|
||||
});
|
||||
|
||||
var ParallaxScroll = {
|
||||
/* PUBLIC VARIABLES */
|
||||
showLogs: false,
|
||||
round: 1000,
|
||||
|
||||
/* PUBLIC FUNCTIONS */
|
||||
init: function() {
|
||||
this._log("init");
|
||||
if (this._inited) {
|
||||
this._log("Already Inited");
|
||||
this._inited = true;
|
||||
return;
|
||||
}
|
||||
this._requestAnimationFrame = (function(){
|
||||
return window.requestAnimationFrame ||
|
||||
window.webkitRequestAnimationFrame ||
|
||||
window.mozRequestAnimationFrame ||
|
||||
window.oRequestAnimationFrame ||
|
||||
window.msRequestAnimationFrame ||
|
||||
function(/* function */ callback, /* DOMElement */ element){
|
||||
window.setTimeout(callback, 1000 / 60);
|
||||
};
|
||||
})();
|
||||
this._onScroll(true);
|
||||
},
|
||||
|
||||
/* PRIVATE VARIABLES */
|
||||
_inited: false,
|
||||
_properties: ['x', 'y', 'z', 'rotateX', 'rotateY', 'rotateZ', 'scaleX', 'scaleY', 'scaleZ', 'scale'],
|
||||
_requestAnimationFrame:null,
|
||||
|
||||
/* PRIVATE FUNCTIONS */
|
||||
_log: function(message) {
|
||||
if (this.showLogs) console.log("Parallax Scroll / " + message);
|
||||
},
|
||||
_onScroll: function(noSmooth) {
|
||||
var scroll = $(document).scrollTop();
|
||||
var windowHeight = $(window).height();
|
||||
this._log("onScroll " + scroll);
|
||||
$("[data-parallax]").each($.proxy(function(index, el) {
|
||||
var $el = $(el);
|
||||
var properties = [];
|
||||
var applyProperties = false;
|
||||
var style = $el.data("style");
|
||||
if (style == undefined) {
|
||||
style = $el.attr("style") || "";
|
||||
$el.data("style", style);
|
||||
}
|
||||
var datas = [$el.data("parallax")];
|
||||
var iData;
|
||||
for(iData = 2; ; iData++) {
|
||||
if($el.data("parallax"+iData)) {
|
||||
datas.push($el.data("parallax-"+iData));
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
var datasLength = datas.length;
|
||||
for(iData = 0; iData < datasLength; iData ++) {
|
||||
var data = datas[iData];
|
||||
var scrollFrom = data["from-scroll"];
|
||||
if (scrollFrom == undefined) scrollFrom = Math.max(0, $(el).offset().top - windowHeight);
|
||||
scrollFrom = scrollFrom | 0;
|
||||
var scrollDistance = data["distance"];
|
||||
var scrollTo = data["to-scroll"];
|
||||
if (scrollDistance == undefined && scrollTo == undefined) scrollDistance = windowHeight;
|
||||
scrollDistance = Math.max(scrollDistance | 0, 1);
|
||||
var easing = data["easing"];
|
||||
var easingReturn = data["easing-return"];
|
||||
if (easing == undefined || !$.easing|| !$.easing[easing]) easing = null;
|
||||
if (easingReturn == undefined || !$.easing|| !$.easing[easingReturn]) easingReturn = easing;
|
||||
if (easing) {
|
||||
var totalTime = data["duration"];
|
||||
if (totalTime == undefined) totalTime = scrollDistance;
|
||||
totalTime = Math.max(totalTime | 0, 1);
|
||||
var totalTimeReturn = data["duration-return"];
|
||||
if (totalTimeReturn == undefined) totalTimeReturn = totalTime;
|
||||
scrollDistance = 1;
|
||||
var currentTime = $el.data("current-time");
|
||||
if(currentTime == undefined) currentTime = 0;
|
||||
}
|
||||
if (scrollTo == undefined) scrollTo = scrollFrom + scrollDistance;
|
||||
scrollTo = scrollTo | 0;
|
||||
var smoothness = data["smoothness"];
|
||||
if (smoothness == undefined) smoothness = 10;
|
||||
smoothness = smoothness | 0;
|
||||
if (noSmooth || smoothness == 0) smoothness = 1;
|
||||
smoothness = smoothness | 0;
|
||||
var scrollCurrent = scroll;
|
||||
scrollCurrent = Math.max(scrollCurrent, scrollFrom);
|
||||
scrollCurrent = Math.min(scrollCurrent, scrollTo);
|
||||
if(easing) {
|
||||
if($el.data("sens") == undefined) $el.data("sens", "back");
|
||||
if(scrollCurrent>scrollFrom) {
|
||||
if($el.data("sens") == "back") {
|
||||
currentTime = 1;
|
||||
$el.data("sens", "go");
|
||||
}
|
||||
else {
|
||||
currentTime++;
|
||||
}
|
||||
}
|
||||
if(scrollCurrent<scrollTo) {
|
||||
if($el.data("sens") == "go") {
|
||||
currentTime = 1;
|
||||
$el.data("sens", "back");
|
||||
}
|
||||
else {
|
||||
currentTime++;
|
||||
}
|
||||
}
|
||||
if(noSmooth) currentTime = totalTime;
|
||||
$el.data("current-time", currentTime);
|
||||
}
|
||||
this._properties.map($.proxy(function(prop) {
|
||||
var defaultProp = 0;
|
||||
var to = data[prop];
|
||||
if (to == undefined) return;
|
||||
if(prop=="scale" || prop=="scaleX" || prop=="scaleY" || prop=="scaleZ" ) {
|
||||
defaultProp = 1;
|
||||
}
|
||||
else {
|
||||
to = to | 0;
|
||||
}
|
||||
var prev = $el.data("_" + prop);
|
||||
if (prev == undefined) prev = defaultProp;
|
||||
var next = ((to-defaultProp) * ((scrollCurrent - scrollFrom) / (scrollTo - scrollFrom))) + defaultProp;
|
||||
var val = prev + (next - prev) / smoothness;
|
||||
if(easing && currentTime>0 && currentTime<=totalTime) {
|
||||
var from = defaultProp;
|
||||
if($el.data("sens") == "back") {
|
||||
from = to;
|
||||
to = -to;
|
||||
easing = easingReturn;
|
||||
totalTime = totalTimeReturn;
|
||||
}
|
||||
val = $.easing[easing](null, currentTime, from, to, totalTime);
|
||||
}
|
||||
val = Math.ceil(val * this.round) / this.round;
|
||||
if(val==prev&&next==to) val = to;
|
||||
if(!properties[prop]) properties[prop] = 0;
|
||||
properties[prop] += val;
|
||||
if (prev != properties[prop]) {
|
||||
$el.data("_" + prop, properties[prop]);
|
||||
applyProperties = true;
|
||||
}
|
||||
}, this));
|
||||
}
|
||||
if (applyProperties) {
|
||||
if (properties["z"] != undefined) {
|
||||
var perspective = data["perspective"];
|
||||
if (perspective == undefined) perspective = 800;
|
||||
var $parent = $el.parent();
|
||||
if(!$parent.data("style")) $parent.data("style", $parent.attr("style") || "");
|
||||
$parent.attr("style", "perspective:" + perspective + "px; -webkit-perspective:" + perspective + "px; "+ $parent.data("style"));
|
||||
}
|
||||
if(properties["scaleX"] == undefined) properties["scaleX"] = 1;
|
||||
if(properties["scaleY"] == undefined) properties["scaleY"] = 1;
|
||||
if(properties["scaleZ"] == undefined) properties["scaleZ"] = 1;
|
||||
if (properties["scale"] != undefined) {
|
||||
properties["scaleX"] *= properties["scale"];
|
||||
properties["scaleY"] *= properties["scale"];
|
||||
properties["scaleZ"] *= properties["scale"];
|
||||
}
|
||||
var translate3d = "translate3d(" + (properties["x"] ? properties["x"] : 0) + "px, " + (properties["y"] ? properties["y"] : 0) + "px, " + (properties["z"] ? properties["z"] : 0) + "px)";
|
||||
var rotate3d = "rotateX(" + (properties["rotateX"] ? properties["rotateX"] : 0) + "deg) rotateY(" + (properties["rotateY"] ? properties["rotateY"] : 0) + "deg) rotateZ(" + (properties["rotateZ"] ? properties["rotateZ"] : 0) + "deg)";
|
||||
var scale3d = "scaleX(" + properties["scaleX"] + ") scaleY(" + properties["scaleY"] + ") scaleZ(" + properties["scaleZ"] + ")";
|
||||
var cssTransform = translate3d + " " + rotate3d + " " + scale3d + ";";
|
||||
this._log(cssTransform);
|
||||
$el.attr("style", "transform:" + cssTransform + " -webkit-transform:" + cssTransform + " " + style);
|
||||
}
|
||||
}, this));
|
||||
if(window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame($.proxy(this._onScroll, this, false));
|
||||
}
|
||||
else {
|
||||
this._requestAnimationFrame($.proxy(this._onScroll, this, false));
|
||||
}
|
||||
}
|
||||
};
|
8
TaxPayerFull/wwwroot/js/purecounter.js
Normal file
8
TaxPayerFull/wwwroot/js/purecounter.js
Normal file
File diff suppressed because one or more lines are too long
1
TaxPayerFull/wwwroot/js/slick.min.js
vendored
Normal file
1
TaxPayerFull/wwwroot/js/slick.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
16
TaxPayerFull/wwwroot/js/smooth-scrollbar.js
Normal file
16
TaxPayerFull/wwwroot/js/smooth-scrollbar.js
Normal file
File diff suppressed because one or more lines are too long
11
TaxPayerFull/wwwroot/js/split-text.min.js
vendored
Normal file
11
TaxPayerFull/wwwroot/js/split-text.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
TaxPayerFull/wwwroot/js/swiper-bundle.js
Normal file
13
TaxPayerFull/wwwroot/js/swiper-bundle.js
Normal file
File diff suppressed because one or more lines are too long
305
TaxPayerFull/wwwroot/js/tilt.jquery.js
Normal file
305
TaxPayerFull/wwwroot/js/tilt.jquery.js
Normal file
@@ -0,0 +1,305 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = function( root, jQuery ) {
|
||||
if ( jQuery === undefined ) {
|
||||
// require('jQuery') returns a factory that requires window to
|
||||
// build a jQuery instance, we normalize how we use modules
|
||||
// that require this pattern but the window provided is a noop
|
||||
// if it's defined (how jquery works)
|
||||
if ( typeof window !== 'undefined' ) {
|
||||
jQuery = require('jquery');
|
||||
}
|
||||
else {
|
||||
jQuery = require('jquery')(root);
|
||||
}
|
||||
}
|
||||
factory(jQuery);
|
||||
return jQuery;
|
||||
};
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
$.fn.tilt = function (options) {
|
||||
|
||||
/**
|
||||
* RequestAnimationFrame
|
||||
*/
|
||||
const requestTick = function() {
|
||||
if (this.ticking) return;
|
||||
requestAnimationFrame(updateTransforms.bind(this));
|
||||
this.ticking = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Bind mouse movement evens on instance
|
||||
*/
|
||||
const bindEvents = function() {
|
||||
const _this = this;
|
||||
$(this).on('mousemove', mouseMove);
|
||||
$(this).on('mouseenter', mouseEnter);
|
||||
if (this.settings.reset) $(this).on('mouseleave', mouseLeave);
|
||||
if (this.settings.glare) $(window).on('resize', updateGlareSize.bind(_this));
|
||||
};
|
||||
|
||||
/**
|
||||
* Set transition only on mouse leave and mouse enter so it doesn't influence mouse move transforms
|
||||
*/
|
||||
const setTransition = function() {
|
||||
if (this.timeout !== undefined) clearTimeout(this.timeout);
|
||||
$(this).css({'transition': `${this.settings.speed}ms ${this.settings.easing}`});
|
||||
if(this.settings.glare) this.glareElement.css({'transition': `opacity ${this.settings.speed}ms ${this.settings.easing}`});
|
||||
this.timeout = setTimeout(() => {
|
||||
$(this).css({'transition': ''});
|
||||
if(this.settings.glare) this.glareElement.css({'transition': ''});
|
||||
}, this.settings.speed);
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse enters tilt element
|
||||
*/
|
||||
const mouseEnter = function(event) {
|
||||
this.ticking = false;
|
||||
$(this).css({'will-change': 'transform'});
|
||||
setTransition.call(this);
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("tilt.mouseEnter");
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the x,y position of the mouse on the tilt element
|
||||
* @returns {{x: *, y: *}}
|
||||
*/
|
||||
const getMousePositions = function(event) {
|
||||
if (typeof(event) === "undefined") {
|
||||
event = {
|
||||
pageX: $(this).offset().left + $(this).outerWidth() / 2,
|
||||
pageY: $(this).offset().top + $(this).outerHeight() / 2
|
||||
};
|
||||
}
|
||||
return {x: event.pageX, y: event.pageY};
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse moves over the tilt element
|
||||
*/
|
||||
const mouseMove = function(event) {
|
||||
this.mousePositions = getMousePositions(event);
|
||||
requestTick.call(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse leaves tilt element
|
||||
*/
|
||||
const mouseLeave = function() {
|
||||
setTransition.call(this);
|
||||
this.reset = true;
|
||||
requestTick.call(this);
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("tilt.mouseLeave");
|
||||
};
|
||||
|
||||
/**
|
||||
* Get tilt values
|
||||
*
|
||||
* @returns {{x: tilt value, y: tilt value}}
|
||||
*/
|
||||
const getValues = function() {
|
||||
const width = $(this).outerWidth();
|
||||
const height = $(this).outerHeight();
|
||||
const left = $(this).offset().left;
|
||||
const top = $(this).offset().top;
|
||||
const percentageX = (this.mousePositions.x - left) / width;
|
||||
const percentageY = (this.mousePositions.y - top) / height;
|
||||
// x or y position inside instance / width of instance = percentage of position inside instance * the max tilt value
|
||||
const tiltX = ((this.settings.maxTilt / 2) - ((percentageX) * this.settings.maxTilt)).toFixed(2);
|
||||
const tiltY = (((percentageY) * this.settings.maxTilt) - (this.settings.maxTilt / 2)).toFixed(2);
|
||||
// angle
|
||||
const angle = Math.atan2(this.mousePositions.x - (left+width/2),- (this.mousePositions.y - (top+height/2)) )*(180/Math.PI);
|
||||
// Return x & y tilt values
|
||||
return {tiltX, tiltY, 'percentageX': percentageX * 100, 'percentageY': percentageY * 100, angle};
|
||||
};
|
||||
|
||||
/**
|
||||
* Update tilt transforms on mousemove
|
||||
*/
|
||||
const updateTransforms = function() {
|
||||
this.transforms = getValues.call(this);
|
||||
|
||||
if (this.reset) {
|
||||
this.reset = false;
|
||||
$(this).css('transform', `perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg)`);
|
||||
|
||||
// Rotate glare if enabled
|
||||
if (this.settings.glare){
|
||||
this.glareElement.css('transform', `rotate(180deg) translate(-50%, -50%)`);
|
||||
this.glareElement.css('opacity', `0`);
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
$(this).css('transform', `perspective(${this.settings.perspective}px) rotateX(${this.settings.disableAxis === 'x' ? 0 : this.transforms.tiltY}deg) rotateY(${this.settings.disableAxis === 'y' ? 0 : this.transforms.tiltX}deg) scale3d(${this.settings.scale},${this.settings.scale},${this.settings.scale})`);
|
||||
|
||||
// Rotate glare if enabled
|
||||
if (this.settings.glare){
|
||||
this.glareElement.css('transform', `rotate(${this.transforms.angle}deg) translate(-50%, -50%)`);
|
||||
this.glareElement.css('opacity', `${this.transforms.percentageY * this.settings.maxGlare / 100}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("change", [this.transforms]);
|
||||
|
||||
this.ticking = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Prepare elements
|
||||
*/
|
||||
const prepareGlare = function () {
|
||||
const glarePrerender = this.settings.glarePrerender;
|
||||
|
||||
// If option pre-render is enabled we assume all html/css is present for an optimal glare effect.
|
||||
if (!glarePrerender)
|
||||
// Create glare element
|
||||
$(this).append('<div class="js-tilt-glare"><div class="js-tilt-glare-inner"></div></div>');
|
||||
|
||||
// Store glare selector if glare is enabled
|
||||
this.glareElementWrapper = $(this).find(".js-tilt-glare");
|
||||
this.glareElement = $(this).find(".js-tilt-glare-inner");
|
||||
|
||||
// Remember? We assume all css is already set, so just return
|
||||
if (glarePrerender) return;
|
||||
|
||||
// Abstracted re-usable glare styles
|
||||
const stretch = {
|
||||
'position': 'absolute',
|
||||
'top': '0',
|
||||
'left': '0',
|
||||
'width': '100%',
|
||||
'height': '100%',
|
||||
};
|
||||
|
||||
// Style glare wrapper
|
||||
this.glareElementWrapper.css(stretch).css({
|
||||
'overflow': 'hidden',
|
||||
'pointer-events': 'none',
|
||||
});
|
||||
|
||||
// Style glare element
|
||||
this.glareElement.css({
|
||||
'position': 'absolute',
|
||||
'top': '50%',
|
||||
'left': '50%',
|
||||
'background-image': `linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)`,
|
||||
'width': `${$(this).outerWidth()*2}`,
|
||||
'height': `${$(this).outerWidth()*2}`,
|
||||
'transform': 'rotate(180deg) translate(-50%, -50%)',
|
||||
'transform-origin': '0% 0%',
|
||||
'opacity': '0',
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Update glare on resize
|
||||
*/
|
||||
const updateGlareSize = function () {
|
||||
this.glareElement.css({
|
||||
'width': `${$(this).outerWidth()*2}`,
|
||||
'height': `${$(this).outerWidth()*2}`,
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Public methods
|
||||
*/
|
||||
$.fn.tilt.destroy = function() {
|
||||
$(this).each(function () {
|
||||
$(this).find('.js-tilt-glare').remove();
|
||||
$(this).css({'will-change': '', 'transform': ''});
|
||||
$(this).off('mousemove mouseenter mouseleave');
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.tilt.getValues = function() {
|
||||
const results = [];
|
||||
$(this).each(function () {
|
||||
this.mousePositions = getMousePositions.call(this);
|
||||
results.push(getValues.call(this));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
$.fn.tilt.reset = function() {
|
||||
$(this).each(function () {
|
||||
this.mousePositions = getMousePositions.call(this);
|
||||
this.settings = $(this).data('settings');
|
||||
mouseLeave.call(this);
|
||||
setTimeout(() => {
|
||||
this.reset = false;
|
||||
}, this.settings.transition);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Loop every instance
|
||||
*/
|
||||
return this.each(function () {
|
||||
|
||||
/**
|
||||
* Default settings merged with user settings
|
||||
* Can be set trough data attributes or as parameter.
|
||||
* @type {*}
|
||||
*/
|
||||
this.settings = $.extend({
|
||||
maxTilt: $(this).is('[data-tilt-max]') ? $(this).data('tilt-max') : 20,
|
||||
perspective: $(this).is('[data-tilt-perspective]') ? $(this).data('tilt-perspective') : 300,
|
||||
easing: $(this).is('[data-tilt-easing]') ? $(this).data('tilt-easing') : 'cubic-bezier(.03,.98,.52,.99)',
|
||||
scale: $(this).is('[data-tilt-scale]') ? $(this).data('tilt-scale') : '1',
|
||||
speed: $(this).is('[data-tilt-speed]') ? $(this).data('tilt-speed') : '400',
|
||||
transition: $(this).is('[data-tilt-transition]') ? $(this).data('tilt-transition') : true,
|
||||
disableAxis: $(this).is('[data-tilt-disable-axis]') ? $(this).data('tilt-disable-axis') : null,
|
||||
axis: $(this).is('[data-tilt-axis]') ? $(this).data('tilt-axis') : null,
|
||||
reset: $(this).is('[data-tilt-reset]') ? $(this).data('tilt-reset') : true,
|
||||
glare: $(this).is('[data-tilt-glare]') ? $(this).data('tilt-glare') : false,
|
||||
maxGlare: $(this).is('[data-tilt-maxglare]') ? $(this).data('tilt-maxglare') : 1,
|
||||
}, options);
|
||||
|
||||
// Add deprecation warning & set disableAxis to deprecated axis setting
|
||||
if(this.settings.axis !== null){
|
||||
console.warn('Tilt.js: the axis setting has been renamed to disableAxis. See https://github.com/gijsroge/tilt.js/pull/26 for more information');
|
||||
this.settings.disableAxis = this.settings.axis;
|
||||
}
|
||||
|
||||
this.init = () => {
|
||||
// Store settings
|
||||
$(this).data('settings', this.settings);
|
||||
|
||||
// Prepare element
|
||||
if(this.settings.glare) prepareGlare.call(this);
|
||||
|
||||
// Bind events
|
||||
bindEvents.call(this);
|
||||
};
|
||||
|
||||
// Init
|
||||
this.init();
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto load
|
||||
*/
|
||||
$('[data-tilt]').tilt();
|
||||
|
||||
return true;
|
||||
}));
|
7
TaxPayerFull/wwwroot/js/waypoints.js
Normal file
7
TaxPayerFull/wwwroot/js/waypoints.js
Normal file
File diff suppressed because one or more lines are too long
2
TaxPayerFull/wwwroot/js/wow.js
Normal file
2
TaxPayerFull/wwwroot/js/wow.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user