Lines Matching +full:set +full:- +full:top

2  * qTip2 - Pretty powerful tooltips - v2.1.1
30 …peration for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
32 ;// Munge the primitives - Paul Irish tip
43 TOP = 'top',
58 ATTR_HAS = 'data-hasqtip',
59 ATTR_ID = 'data-qtip-id',
60 WIDGET = ['ui-widget', 'ui-tooltip'],
64 CLASS_FIXED = NAMESPACE+'-fixed',
65 CLASS_DEFAULT = NAMESPACE + '-default',
66 CLASS_FOCUS = NAMESPACE + '-focus',
67 CLASS_HOVER = NAMESPACE + '-hover',
68 CLASS_DISABLED = NAMESPACE+'-disabled',
79 * Adapted from: http://ajaxian.com/archives/attack-of-the-ie-conditional-comment
84 while ((div.innerHTML = '<!--[if gt IE '+(++v)+']><i></i><![endif]-->')) {
94 …('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''…
107 this._id = NAMESPACE + '-' + id;
122 // Set the initial flags
143 $.attr(this.target[0], 'aria-describedby', this._id);
148 …'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, NAMESPACE + '-pos-' + options.position…
155 'aria-live': 'polite',
156 'aria-atomic': FALSE,
157 'aria-describedby': this._id + '-content',
158 'aria-hidden': TRUE
167 'class': NAMESPACE + '-content',
168 'id': this._id + '-content',
169 'aria-atomic': TRUE
173 // Set rendered flag and prevent redundant reposition calls for now
174 this.rendered = -1;
190 // Set proper rendered flag and update content if not a callback function (called in toggle)
240 // Set flag the signify destroy is taking place to plugins
268 .removeAttr('aria-describedby');
327 // DEPRECATED - Old content.ajax plugin functionality
342 if(content && once) { api.set('content.text', content); }
347 api.set('content.text', status + ': ' + error);
350 return !once ? (api.set('content.text', loading), deferred) : loading;
391 // Setup builtin .set() option checks
397 new_id = NAMESPACE + '-' + id;
404 this.elements.content[0].id = this._id + '-content';
405 this.elements.title[0].id = this._id + '-title';
435 this.set('content.'+o, v); // Backwards title.text/button compat
474 // Set tracking flag
529 PROTOTYPE.set = function(option, value) {
544 // Set all of the defined options to their new values
550 // Set new obj value
558 // Set the new params for the callback
562 // Re-sanitize options
566 * Execute any valid callbacks for the set options
567 * Also set positioning flag so we don't get loads of redundant repositioning calls.
643 id = this._id+'-title';
650 'class': NAMESPACE + '-titlebar ' + (this.options.style.widget ? createWidgetClass('header') : '')
655 'class': NAMESPACE + '-title',
656 'aria-atomic': TRUE
661 // Button-specific events
662 .delegate('.qtip-close', 'mousedown keydown mouseup keyup mouseout', function(event) {
663 $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
665 .delegate('.qtip-close', 'mouseover mouseout', function(event){
666 $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
689 // Set positioning flag
707 position = { left: 0, top: 0 }, property
717 // Force left top and set position
718 at = { x: LEFT, y: TOP };
719 position = { left: target[0], top: target[1] }; property
724 // Force left top to allow flipping
725 at = { x: LEFT, y: TOP };
740 left: event.pageX - position.left + (offset && offset.left || 0),
741 top: event.pageY - position.top + (offset && offset.top || 0) property
746 position.left -= mouse.scrollX - win.scrollLeft();
747 position.top -= mouse.scrollY - win.scrollTop();
773 top: (viewport || target).scrollTop(), property
807 // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
812 position.left -= win.scrollLeft();
813 position.top -= win.scrollTop();
819 position.top += at.y === BOTTOM ? targetHeight : at.y === CENTER ? targetHeight / 2 : 0;
824 position.left += adjust.x + (my.x === RIGHT ? -elemWidth : my.x === CENTER ? -elemWidth / 2 : 0);
825 position.top += adjust.y + (my.y === BOTTOM ? -elemHeight : my.y === CENTER ? -elemHeight / 2 : 0);
835 if(offset && position.adjusted.top) { position.top += offset.top; }
838 // Viewport adjustment is disabled, set values to zero
839 else { position.adjusted = { left: 0, top: 0 }; } property
845 …s disabled, target it mouse, no animation is defined or positioning gives NaN out, set CSS directly
846 …if(effect === FALSE || !visible || isNaN(position.left) || isNaN(position.top) || target === 'mous…
854 // Reset attributes to avoid cross-browser rendering bugs
862 // Set positioning flag
879 pos.top += i * e.scrollTop();
882 // Compensate for non-static containers offset
887 scroll(ownerDocument, -1);
892 parentOffset.top += (parseFloat($.css(parent, 'borderTopWidth')) || 0);
895 pos.left -= parentOffset.left + (parseFloat($.css(parent, 'marginLeft')) || 0);
896 pos.top -= parentOffset.top + (parseFloat($.css(parent, 'marginTop')) || 0);
914 corner = ('' + corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, CENTER).toLowerCase();
916 this.y = (corner.match(/top|bottom|center/i) || ['inherit'])[0].toLowerCase();
978 // Check if the tooltip is in an identical state to the new would-be state
990 // Set ARIA hidden attribute
991 $.attr(tooltip[0], 'aria-hidden', !!!state);
1008 // Update the tooltip position (set width first to prevent viewport/max-width issues)
1036 // Define post-animation, state specific properties
1050 // If set, hide tooltip when inactive for delay period
1051 this.options.show.target.trigger('qtip-'+this.id+'-inactive');
1060 top: '' property
1086 // If inactive hide method is set, active it
1087 if(state) { opts.target.trigger('qtip-'+this.id+'-inactive'); }
1105 // Only update the z-index if it has changed and tooltip is not already focused
1109 // Only update z-index's if they've changed
1111 // Reduce our z-index's and keep them properly ordered
1114 this.style.zIndex = this.style.zIndex - 1;
1122 // Set the new z-index
1133 // Set focused status to FALSE
1151 .attr('aria-disabled', state);
1178 'class': 'qtip-close ' + (this.options.style.widget ? '' : NAMESPACE+'-icon'),
1180 'aria-label': close
1184 'class': 'ui-icon ui-icon-close',
1211 return WIDGET.concat('').join(cls ? '-'+cls+' ' : ' ');
1223 CLASS_DISABLED = on ? 'ui-state-disabled' : 'qtip-disabled';
1226 …tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.op…
1235 elements.button.toggleClass(NAMESPACE+'-icon', !on);
1315 var ns = '.' + this._id + (suffix ? '-'+suffix : '');
1322 $(targets).unbind('.' + this._id + (suffix ? '-'+suffix : ''));
1346 // Focus the tooltip on mouseenter (z-index stacking)
1355 // Hide when we leave the tooltip and not onto the show target (if a hide event is set)
1425 if(('' + options.hide.event).indexOf('unfocus') > -1) {
1442 this._bind(showTarget, 'qtip-'+this.id+'-inactive', inactiveMethod);
1445 this._bind(hideTarget.add(tooltip), QTIP.inactiveEvents, inactiveMethod, '-inactive');
1453 if((showIndex > -1 && hideTarget.add(showTarget).length === hideTarget.length)) {
1477 if(abs(event.pageX - origin.pageX) >= limit || abs(event.pageY - origin.pageY) >= limit) {
1519 // Un-assignment method
1540 else { $(targets[0]).unbind('.'+this._id+'-create'); }
1560 // Grab data from metadata.name (or data-qtipopts as fallback) using .data() method,
1571 // Re-grab our positioning options now we've merged our metadata and set id to passed value
1611 // Add has-qtip attribute
1625 elem.one('remove.qtip-'+id+' removeqtip.qtip-'+id, function() {
1638 event = args[args.length - 1],
1660 api.set(notation, newValue);
1698 namespace = '.qtip-'+id+'-create';
1700 // Initialize the qTip and re-grab newly sanitized options
1730 * Also set onTarget when triggered to keep mouse tracking working
1790 api.set('content.text', val);
1793 // Use the regular attr method to set, then cache the result
1808 …// Grab all elements with an oldtitle set, and change it to regular title attribute, if keepData i…
1829 * http://code.jquery.com/ui/jquery-ui-git.js
1853 // Base z-index for all qTips
1869 my: 'top left',
1930 TIPNS = '.qtip-tip',
1936 BG_COLOR = 'background-color',
1946 // Camel-case method, taken from jQuery source
1947 // http://code.jquery.com/jquery-1.8.0.js
1952 * http://modernizr.com/downloads/modernizr-latest.js
1979 return '<qtipvml:'+tag+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(props||'')+
2001 …tip = this.element = qtip.elements.tip = $('<div />', { 'class': NAMESPACE+'-tip' }).prependTo(qti…
2040 …corner.y === TOP || (corner.y === CENTER && this.element.position().top + (this.size[1] / 2) + thi…
2094 // Attempt to detect the background colour from various elements, left-to-right precedance
2098 …// Attempt to detect the correct border side colour from various elements, left-to-right precedance
2121 hyp[2] = Math.sqrt( pow(hyp[0], 2) - pow(this.border, 2) );
2122 hyp[3] = Math.sqrt( pow(hyp[1], 2) - pow(this.border, 2) );
2149 // Set common side shapes
2188 // Re-determine tip if not already set
2222 // Set border width (use detected border width if options.border is true)
2226 // Border colour was invalid, set border to zero
2243 …mimic.x === LEFT ? border : mimic.x === RIGHT ? newSize[0] - size[0] - border : (newSize[0] - size…
2244 round(mimic.y === TOP ? newSize[1] - size[1] : 0)
2249 round(mimic.x === LEFT ? newSize[0] - size[0] : 0),
2250 …round(mimic.y === TOP ? border : mimic.y === BOTTOM ? newSize[1] - size[1] - border : (newSize[1]
2256 // Set the canvas size using calculated size
2264 // Set properties
2281 if(tooltip.css('background-clip') === 'border-box') {
2297 // Setup VML-specific offset for pixel-perfection
2301 // Set initial CSS
2304 antialias: ''+(mimic.string().indexOf(CENTER) > -1),
2305 left: translate[0] - (translate[2] * Number(precedance === X)),
2306 top: translate[1] - (translate[2] * Number(precedance === Y)), property
2313 // Set shape specific attributes
2341 isWidget = this.qtip.tooltip.hasClass('ui-widget'),
2361 b = precedance === Y ? LEFT : TOP;
2363 position[MARGIN+'-' + b] = -Math.round(size[ precedance === Y ? 0 : 1 ] / 2) + userOffset;
2370 position[ side ] = Math.max(-self.border, i ? bc : (userOffset + (br > b ? br : -b)));
2375 position[ corner[precedance] ] -= size[ precedance === X ? 0 : 1 ];
2377 // Set and return new position
2378 tip.css({ margin: '', top: '', bottom: '', left: '', right: '' }).css(position); property
2391 shift = { left: FALSE, top: FALSE, x: 0, y: 0 }, property
2396 // Horizontal - Shift or flip method
2404 // Vertical - Shift or flip method
2405 if(vertical === SHIFT && newCorner.precedance === Y && adjust.top && newCorner.x !== CENTER) {
2408 else if(vertical !== SHIFT && adjust.top) {
2409 …ewCorner.y = newCorner.y === CENTER ? (adjust.top > 0 ? TOP : BOTTOM) : (newCorner.y === TOP ? BOT…
2413 …if(newCorner.string() !== cache.corner.string() && (cache.cornerTop !== adjust.top || cache.corner…
2421 // Readjust offset object to make it left/top
2422 if(offset.right !== undefined) { offset.left = -offset.right; }
2423 if(offset.bottom !== undefined) { offset.top = -offset.bottom; }
2429 css[MARGIN+'-left'] = shift.x = offset[MARGIN+'-left'] - adjust.left;
2433 [ adjust.left, -offset.left ] : [ -adjust.left, offset.left ];
2436 pos.left -= adjust.left;
2443 if(shift.top = (vertical === SHIFT && !!adjust.top)) {
2445 css[MARGIN+'-top'] = shift.y = offset[MARGIN+'-top'] - adjust.top;
2449 [ adjust.top, -offset.top ] : [ -adjust.top, offset.top ];
2452 pos.top -= adjust.top;
2453 shift.top = FALSE;
2456 css[ offset.bottom !== undefined ? BOTTOM : TOP ] = shift.y;
2470 …pos.left -= offset.left.charAt ? offset.user : horizontal !== SHIFT || shift.top || !shift.left &&…
2471 …pos.top -= offset.top.charAt ? offset.user : vertical !== SHIFT || shift.left || !shift.left && !s…
2474 cache.cornerLeft = adjust.left; cache.cornerTop = adjust.top;
2516 // Re-set dimensions and redraw the tip
2556 adjusted = { left: 0, top: 0 }, property
2572 offset: viewport.offset() || { left: 0, top: 0 } property
2578 offset: container.offset() || { left: 0, top: 0 } property
2586 viewportScroll = -container.offset[side1] + viewport.offset[side1] + viewport['scroll'+side1],
2587 myLength = mySide === side1 ? elemLength : mySide === side2 ? -elemLength : -elemLength / 2,
2588 … atLength = atSide === side1 ? targetLength : atSide === side2 ? -targetLength : -targetLength / 2,
2591 overflow1 = viewportScroll - initialPos + tipAdjust,
2592 overflow2 = initialPos + elemLength - viewport[lengthName] - viewportScroll + tipAdjust,
2593 …offset = myLength - (my.precedance === side || mySide === my[otherSide] ? atLength : 0) - (atSide …
2598 offset = (mySide === side1 ? 1 : -1) * myLength - tipAdjust;
2601 position[side1] += overflow1 > 0 ? overflow1 : overflow2 > 0 ? -overflow2 : 0;
2603-container.offset[side1] + viewport.offset[side1] + (tipAdjust && tip.corner[side] === CENTER ? ti…
2604 initialPos - offset,
2606 …Math.max(-container.offset[side1] + viewport.offset[side1] + viewport[lengthName], initialPos + of…
2617 // Check for overflow on the left/top
2619 position[side1] -= offset + adjust;
2625 position[side1] -= (mySide === CENTER ? -offset : offset) + adjust;
2630 if(position[side1] < viewportScroll && -position[side1] > overflow2) {
2635 return position[side1] - initialPos;
2638 // Set newMy if using flip or flipinvert methods
2644top: methodY !== 'none' ? calculate( Y, X, methodY, adjust.y, TOP, BOTTOM, HEIGHT, targetHeight, e… property
2647 // Set tooltip position class if it's changed
2648 if(newMy && cache.lastClass !== (newClass = NAMESPACE + '-pos-' + newMy.abbrev())) {