Simon Grim 9 years ago
parent
commit
e123478982
  1. 10
      js/jQueryPlugins.js

10
js/jQueryPlugins.js

@ -17,6 +17,16 @@ window.setInterval = function (vCallback, nDelay) { // additional arguments wil @@ -17,6 +17,16 @@ window.setInterval = function (vCallback, nDelay) { // additional arguments wil
function () {vCallback.apply(oThis, aArgs);} : vCallback, nDelay);
};
// get actual width/height of elements including invisible ones
// minified 1.0.17 of https://github.com/dreamerslab/jquery.actual
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a);
}else{a(jQuery);}}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf;a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';
}var f={absolute:false,clone:false,includeMargin:false,display:"block"};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";
e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().addBack().filter(":hidden");
d+="visibility: hidden !important; display: "+i.display+" !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this);
var n=m.attr("style");g.push(n);m.attr("style",n?n+";"+d:d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");
}else{o.attr("style",n);}});};}h();var k=/(outer)/.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});}));
// bind callback function for event of clicking outside of element
(function(jQuery) {
jQuery.fn.clickoutside = function(callback) {

Loading…
Cancel
Save