PHP Classes

File: public/assets/visible/visible.min.js

Recommend this page to a friend!
  Classes of Aby Dahana   Aksara   public/assets/visible/visible.min.js   Download  
File: public/assets/visible/visible.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Update commit for the version 4.3.3

Updates for this commit:
- Updating the default dependency of Bootstrap, now using Bootstrap version 5;
- Updating the minimum CI version to ^4.2.0;
- Secrete the Bootstrap framework as the required dependency, now you can create your own theme without concern to conflict with Bootstrap;
- Refine the Aksara core including its components;
- Fixing the feature that previously broken.
Date: 1 year ago
Size: 2,917 bytes
 

Contents

Class file image Download
/** * visible() */ !function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top<h,s=g.bottom>0&&g.bottom<=h,c=g.left>=0&&g.left<f,a=g.right>0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery); /** * isInViewport() */ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n(e.jQuery)}(this,function(d){"use strict";function f(e,n){var t=e.getBoundingClientRect(),o=t.top,r=t.bottom,i=t.left,a=t.right,u=d.extend({tolerance:0,viewport:window},n),c=!1,s=u.viewport.jquery?u.viewport:d(u.viewport);s.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),s=d(window));var e=s.height(),t=s.width(),n=s[0].toString();return s[0]!==window&&"[object Window]"!==n&&"[object DOMWindow]"!==n&&(o-=(n=s[0].getBoundingClientRect()).top,r-=n.top,i-=n.left,a-=n.left,f.scrollBarWidth=f.scrollBarWidth||(n=s,s=d("<div></div>").css({width:"100%"}),n.append(s),n=n.width()-s.width(),s.remove(),n),t-=f.scrollBarWidth),u.tolerance=~~Math.round(parseFloat(u.tolerance)),u.tolerance<0&&(u.tolerance=e+u.tolerance),a<=0||t<=i?c:c=u.tolerance?o<=u.tolerance&&r>=u.tolerance:0<r&&o<=e}function o(e){if(e){e=e.split(",");return 1===e.length&&isNaN(e[0])&&(e[1]=e[0],e[0]=void 0),{tolerance:e[0]?e[0].trim():void 0,viewport:e[1]?d(e[1].trim()):void 0}}return{}}(d=d&&d.hasOwnProperty("default")?d.default:d).extend(d.expr.pseudos||d.expr[":"],{"in-viewport":d.expr.createPseudo?d.expr.createPseudo(function(n){return function(e){return f(e,o(n))}}):function(e,n,t){return f(e,o(t[3]))}}),d.fn.isInViewport=function(t){return this.filter(function(e,n){return f(n,t)})},d.fn.run=function(e){var t=this;1===arguments.length&&"function"==typeof e&&(e=[e]);if(e instanceof Array)return e.forEach(function(n){"function"!=typeof n?(console.warn("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions"),console.warn("isInViewport: Ignoring non-function values in array and moving on")):[].slice.call(t).forEach(function(e){return n.call(d(e))})}),this;throw new SyntaxError("isInViewport: Argument(s) passed to .do/.run should be a function or an array of functions")}});