Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 | 66x | /*! * jquery.marker-animation 1.3.5 - Marker animation jQuery plugin * Copyright (c) 2019 Technote <technote.space@gmail.com> (https://technote.space) - https://github.com/technote-space/jquery.marker-animation#readme * License: MIT */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.markerAnimation=t(require("jquery")):e.markerAnimation=t(e.jQuery)}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var o,r=n(0),i=(o=r)&&o.__esModule?o:{default:o};n(2),i.default.fn.markerAnimation=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.each(function(){var e=(0,i.default)(this),n="markerAnimation",o={op:{color:"#fe9",padding_bottom:".6em",thickness:".6em",delay:".1s",duration:"2s",function:"ease",font_weight:"bold",repeat:!1,stripe:!1,stripe_thickness:2,cssFilter:function(e){return e}},resetKeys:["background","padding-bottom","font-weight","transition"],setOption:function(e){i.default.extend(this.op,e)},destroy:function(){e[0].resetValues&&(this.resetKeys.forEach(function(t){e.css(t,e[0].resetValues[t])}),e[0].resetValues=null),e.attr("data-marker_animation",!1)},create:function(t){var o=this;this.setOption(t);var r={display:"inline","background-position":"left 0 center","padding-bottom":o.op.padding_bottom};o.op.stripe?(r["background-size"]="0 "+o.op.thickness,r["background-repeat"]="no-repeat",r["background-image"]="repeating-linear-gradient(-45deg, "+o.op.color+", "+o.op.color+" "+o.op.stripe_thickness+"px,transparent "+o.op.stripe_thickness+"px,transparent "+2*o.op.stripe_thickness+"px)"):(r["background-size"]="200% "+o.op.thickness,r["background-repeat"]="repeat-x",r["background-image"]="linear-gradient(to right, rgba(255,255,255,0) 50%, "+o.op.color+" 50%)"),o.op.font_weight&&(r["font-weight"]=o.op.font_weight),e[0].resetValues={},o.resetKeys.forEach(function(t){e[0].resetValues[t]=e.css(t)}),r=o.op.cssFilter(r),o.op.stripe?e.css(r).css({"background-size":"100% "+o.op.thickness}).attr("data-marker_animation",!0):"0s"===o.op.delay&&"0s"===o.op.duration?e.css(r).css({"background-position":"left -100% center"}).attr("data-marker_animation",!0):e.data("inview",!1).on("inview."+n,function(e,t){t?o.onInView():o.offInView()}).css(r).attr("data-marker_animation",!0)},refresh:function(){this.destroy(),this.stop(),this.create()},removeEvent:function(){e.off("."+n)},stop:function(){e.off("inview."+n)},onInView:function(){e.stop(!0,!0).css({transition:"background-position "+this.op.duration+" "+this.op.function+" "+this.op.delay,"background-position":"left -100% center"}),this.op.repeat||this.stop()},offInView:function(){this.op.repeat&&e.trigger("refresh."+n)}};if("string"==typeof t[0]&&"destroy"===t[0])e.trigger("destroy."+n);else Iif("string"==typeof t[0]&&"refresh"===t[0])e.trigger("refresh."+n);else{e.attr("data-marker_animation")&&(o.destroy(),o.removeEvent());var r=i.default.extend({},t[0]);Object.keys(o.op).forEach(function(t){var n=e.data("ma_"+t);void 0!==n&&(r[t]=n),"string"==typeof r[t]&&(r[t]=r[t].trim(),"delay"===t||"duration"===t?/^-?\d*\.?\d+m?s$/.test(r[t])?/^-?0?\.?0+m?s$/.test(r[t])&&(r[t]="0s"):r[t]="0s":"stripe_thickness"===t&&(r[t]=parseInt(r[t],10),isNaN(r[t])&&(r[t]=2)))}),o.create(r),e.on("destroy."+n,function(){o.destroy(),o.removeEvent()}).on("refresh."+n,function(){o.refresh()}),r.test&&(e[0].markerAnimationObj=o)}})}},function(e,t,n){var o,r,i;r=[n(0)],void 0===(i="function"==typeof(o=function(e){var t,n,o,r=[],i=document,a=window,s=i.documentElement;function f(){if(r.length){var o=0,f=e.map(r,function(e){var t=e.data.selector,n=e.$element;return t?n.find(t):n});for(t=t||(l=void 0,h=void 0,g=void 0,(g={height:a.innerHeight,width:a.innerWidth}).height||!(l=i.compatMode)&&e.support.boxModel||(h="CSS1Compat"===l?s:i.body,g={height:h.clientHeight,width:h.clientWidth}),g),n=n||{top:a.pageYOffset||s.scrollTop||i.body.scrollTop,left:a.pageXOffset||s.scrollLeft||i.body.scrollLeft};o<r.length;o++)if(e.contains(s,f[o][0])){var c=e(f[o]),u={height:c[0].offsetHeight,width:c[0].offsetWidth},d=c.offset(),p=c.data("inview");if(!n||!t)return;d.top+u.height>n.top&&d.top<n.top+t.height&&d.left+u.width>n.left&&d.left<n.left+t.width?p||c.data("inview",!0).trigger("inview",[!0]):p&&c.data("inview",!1).trigger("inview",[!1])}}var l,h,g}e.event.special.inview={add:function(t){r.push({data:t,$element:e(this),element:this}),!o&&r.length&&(o=setInterval(f,250))},remove:function(e){for(var t=0;t<r.length;t++){var n=r[t];Eif(n.element===this&&n.data.guid===e.guid){r.splice(t,1);break}}r.length||(clearInterval(o),o=null)}},e(a).bind("scroll resize scrollstop",function(){t=n=null}),!s.addEventListener&&s.attachEvent&&s.attachEvent("onfocusin",function(){n=null})})?o.apply(t,r):o)||(e.exports=i)}])}); |