In this repo i store all my websites, each in a different branch
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

9 righe
3.4 KiB

/*
* Tipper v3.1.0 - 2014-11-25
* A jQuery plugin for simple tooltips. Part of the formstone library.
* http://formstone.it/tipper/
*
* Copyright 2014 Ben Plum; MIT Licensed
*/
!function(a){"use strict";function b(b){return l.formatter=e,j=a("body"),a(this).not(".tipper-attached").addClass("tipper-attached").on("mouseenter.tipper",a.extend({},l,b||{}),c)}function c(b){var c=a(this),e=a.extend(!0,{},b.data,c.data("tipper-options"));e.$target=c,k={left:b.pageX,top:b.pageY},e.delay?e.timer=h(e.timer,e.delay,function(){d(e.$target,e)}):d(e.$target,e),e.$target.one("mouseleave.tipper",e,g),!e.follow&&e.match&&e.$target.on("mousemove.tipper",e,f).trigger("mousemove")}function d(b,c){var d="";d+='<div class="tipper '+c.direction+'">',d+='<div class="tipper-content">',d+=c.formatter.apply(j,[b]),d+='<span class="tipper-caret"></span>',d+="</div>",d+="</div>",c.$target=b,c.$tipper=a(d),j.append(c.$tipper),c.$content=c.$tipper.find(".tipper-content"),c.$caret=c.$tipper.find(".tipper-caret"),c.offset=b.offset(),c.height=b.outerHeight(),c.width=b.outerWidth(),c.tipperPos={},c.caretPos={},c.contentPos={};var e=c.$caret.outerHeight(!0),g=c.$caret.outerWidth(!0),h=c.$content.outerHeight(!0),i=c.$content.outerWidth(!0);"right"===c.direction||"left"===c.direction?(c.caretPos.top=(h-e)/2,c.contentPos.top=-h/2,"right"===c.direction?c.contentPos.left=c.margin:"left"===c.direction&&(c.contentPos.left=-(i+c.margin))):(c.caretPos.left=(i-g)/2,c.contentPos.left=-i/2,"bottom"===c.direction?c.contentPos.top=c.margin:"top"===c.direction&&(c.contentPos.top=-(h+c.margin))),c.$content.css(c.contentPos),c.$caret.css(c.caretPos),c.follow?c.$target.on("mousemove.tipper",c,f).trigger("mousemove"):c.match?("right"===c.direction||"left"===c.direction?(c.tipperPos.top=k.top,"right"===c.direction?c.tipperPos.left=c.offset.left+c.width:"left"===c.direction&&(c.tipperPos.left=c.offset.left)):(c.tipperPos.left=k.left,"bottom"===c.direction?c.tipperPos.top=c.offset.top+c.height:"top"===c.direction&&(c.tipperPos.top=c.offset.top)),c.$tipper.css(c.tipperPos)):("right"===c.direction||"left"===c.direction?(c.tipperPos.top=c.offset.top+c.height/2,"right"===c.direction?c.tipperPos.left=c.offset.left+c.width:"left"===c.direction&&(c.tipperPos.left=c.offset.left)):(c.tipperPos.left=c.offset.left+c.width/2,"bottom"===c.direction?c.tipperPos.top=c.offset.top+c.height:"top"===c.direction&&(c.tipperPos.top=c.offset.top)),c.$tipper.css(c.tipperPos)),c.$tipper.addClass("visible")}function e(a){return a.data("title")}function f(a){var b=a.data;k={left:a.pageX,top:a.pageY},b.follow&&"undefined"!=typeof b.$tipper&&b.$tipper.css({left:k.left,top:k.top})}function g(a){var b=a.data;i(b.timer),"undefined"!=typeof b.$tipper&&(b.$tipper.remove(),b.$target.off("mousemove.tipper mouseleave.tipper"),k=null)}function h(a,b,c){return i(a),setTimeout(c,b)}function i(a){a&&(clearTimeout(a),a=null)}var j,k,l={delay:0,direction:"top",follow:!1,formatter:a.noop,margin:15,match:!1},m={defaults:function(b){return l=a.extend(l,b||{}),"object"==typeof this?a(this):!0},destroy:function(){return a(this).trigger("mouseleave.tipper").off(".tipper").removeClass("tipper-attached")}};a.fn.tipper=function(a){return m[a]?m[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:b.apply(this,arguments)},a.tipper=function(a){"defaults"===a&&m.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery);