MyOAExx/Scripts/js/jquery-qtip-1.0.0-rc3140944/jquery.qtip-1.0.js
(开头部分) 65KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*!
* jquery.qtip. The jQuery tooltip plugin
*
* Copyright (c) 2009 Craig Thompson
* http://craigsworks.com
*
* Licensed under MIT
* http://www.opensource.org/licenses/mit-license.php
*
* Launch : February 2009
* Version : 1.0.0-rc3
* Released: Tuesday 12th May, 2009 - 00:00
* Debug: jquery.qtip.debug.js
*/
"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
/*jslint browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true */
/*global window: false, jQuery: false */
(function ($) {
// Assign cache and event initialisation on document load
$(document).ready(function () {
// Adjust positions of the tooltips on window resize or scroll if enabled
var i;
$(window).bind('resize scroll', function (event) {
for (i = 0; i < $.fn.qtip.interfaces.length; i++) {
// Access current elements API
var api = $.fn.qtip.interfaces[i];
// Update position if resize or scroll adjustments are enabled
if(api && api.status && api.status.rendered && api.options.position.type !== 'static' && api.elements.tooltip.is(':visible') &&
(api.options.position.adjust.scroll && event.type === 'scroll' || api.options.position.adjust.resize && event.type === 'resize')) {
// Queue the animation so positions are updated correctly
api.updatePosition(event, true);
}
}
});
// Hide unfocus toolipts on document mousedown
$(document).bind('mouseenter.qtip', function (event) {
if($(event.target).parents('div.qtip').length === 0) {
var tooltip = $('.qtipSelector'),
api = tooltip.qtip('api');
// Only hide if its visible and not the tooltips target
if(tooltip.is(':visible') && api && api.status && !api.status.disabled && $(event.target).add(api.elements.target).length > 1) { api.hide(event); }
}
});
});
// Corner object parser
function Corner(corner) {
if(!corner){ return false; }
this.x = String(corner).replace(/middle/i, 'center').match(/left|right|center/i)[0].toLowerCase();
this.y = String(corner).replace(/middle/i, 'center').match(/top|bottom|center/i)[0].toLowerCase();
this.offset = { left: 0, top: 0 };
this.precedance = (corner.charAt(0).search(/^(t|b)/) > -1) ? 'y' : 'x';
this.string = function(){ return (this.precedance === 'y') ? this.y+this.x : this.x+this.y; };
}
后面还有 1980 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。