|
@@ -492,7 +492,105 @@ date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},da
|
|
|
(function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery);
|
|
|
(function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a,
|
|
|
b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery);
|
|
|
-;// ------------- DRAW FILL SVG ---------------------------------------------- //
|
|
|
+;// ------------- JQUERY APPEAR ---------------------------------------------- //
|
|
|
+// ============ https://github.com/morr/jquery.appear ====================== //
|
|
|
+// -------------------------------------------------------------------------- //
|
|
|
+
|
|
|
+(function($) {
|
|
|
+ var selectors = [];
|
|
|
+
|
|
|
+ var check_binded = false;
|
|
|
+ var check_lock = false;
|
|
|
+ var defaults = {
|
|
|
+ interval: 250,
|
|
|
+ force_process: false
|
|
|
+ }
|
|
|
+ var $window = $(window);
|
|
|
+
|
|
|
+ var $prior_appeared;
|
|
|
+
|
|
|
+ function process() {
|
|
|
+ check_lock = false;
|
|
|
+ for (var index = 0, selectorsLength = selectors.length; index < selectorsLength; index++) {
|
|
|
+ var $appeared = $(selectors[index]).filter(function() {
|
|
|
+ return $(this).is(':appeared');
|
|
|
+ });
|
|
|
+
|
|
|
+ $appeared.trigger('appear', [$appeared]);
|
|
|
+
|
|
|
+ if ($prior_appeared) {
|
|
|
+ var $disappeared = $prior_appeared.not($appeared);
|
|
|
+ $disappeared.trigger('disappear', [$disappeared]);
|
|
|
+ }
|
|
|
+ $prior_appeared = $appeared;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // "appeared" custom filter
|
|
|
+ $.expr[':']['appeared'] = function(element) {
|
|
|
+ var $element = $(element);
|
|
|
+ if (!$element.is(':visible')) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var window_left = $window.scrollLeft();
|
|
|
+ var window_top = $window.scrollTop();
|
|
|
+ var offset = $element.offset();
|
|
|
+ var left = offset.left;
|
|
|
+ var top = offset.top;
|
|
|
+
|
|
|
+ if (top + $element.height() >= window_top &&
|
|
|
+ top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() &&
|
|
|
+ left + $element.width() >= window_left &&
|
|
|
+ left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $.fn.extend({
|
|
|
+ // watching for element's appearance in browser viewport
|
|
|
+ appear: function(options) {
|
|
|
+ var opts = $.extend({}, defaults, options || {});
|
|
|
+ var selector = this.selector || this;
|
|
|
+ if (!check_binded) {
|
|
|
+ var on_check = function() {
|
|
|
+ if (check_lock) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ check_lock = true;
|
|
|
+
|
|
|
+ setTimeout(process, opts.interval);
|
|
|
+ };
|
|
|
+
|
|
|
+ $(window).scroll(on_check).resize(on_check);
|
|
|
+ check_binded = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (opts.force_process) {
|
|
|
+ setTimeout(process, opts.interval);
|
|
|
+ }
|
|
|
+ selectors.push(selector);
|
|
|
+ return $(selector);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $.extend({
|
|
|
+ // force elements's appearance check
|
|
|
+ force_appear: function() {
|
|
|
+ if (check_binded) {
|
|
|
+ process();
|
|
|
+ return true;
|
|
|
+ };
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+})(jQuery);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// ------------- DRAW FILL SVG ---------------------------------------------- //
|
|
|
// ============ https://github.com/callmenick/Draw-Fill-SVG ================= //
|
|
|
// -------------------------------------------------------------------------- //
|
|
|
|