define( [
"./core",
"./var/isFunction",
"./core/init",
"./manipulation", // clone
"./traversing" // parent, contents
], function( jQuery, isFunction ) {
"use strict";
jQuery.fn.extend( {
wrapAll: function( html ) {
var wrap;
if ( this[ 0 ] ) {
if ( isFunction( html ) ) {
html = html.call( this[ 0 ] );
}
// The elements to wrap the target around
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
if ( this[ 0 ].parentNode ) {
wrap.insertBefore( this[ 0 ] );
}
wrap.map( function() {
var elem = this;
while ( elem.firstElementChild ) {
elem = elem.firstElementChild;
}
return elem;
} ).append( this );
}
return this;
},
wrapInner: function( html ) {
if ( isFunction( html ) ) {
return this.each( function( i ) {
jQuery( this ).wrapInner( html.call( this, i ) );
} );
}
return this.each( function() {
var self = jQuery( this ),
contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
} else {
self.append( html );
}
} );
},
wrap: function( html ) {
var htmlIsFunction = isFunction( html );
return this.each( function( i ) {
jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
} );
},
unwrap: function( selector ) {
this.parent( selector ).not( "body" ).each( function() {
jQuery( this ).replaceWith( this.childNodes );
} );
return this;
}
} );
return jQuery;
} );
tars'>44319-fix-fed-share-user-avatars
blob: 957385a269f21e00d114144dc4fc94b5fc578596 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
.tipsy { font-size:10px; position:absolute; padding:5px; z-index:100000; }
.tipsy-inner { background-color:#000; color:#FFF; max-width:200px; padding:5px 8px 4px 8px; text-align:center; }
/* Rounded corners */
.tipsy-inner { border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; }
/* Uncomment for shadow */
/*.tipsy-inner { box-shadow:0 0 5px #000000; -webkit-box-shadow:0 0 5px #000000; -moz-box-shadow:0 0 5px #000000; }*/
.tipsy-arrow { position:absolute; width:0; height:0; border:5px solid transparent; }
/* Rules to colour arrows */
.tipsy-arrow-n { border-bottom-color:#000; }
.tipsy-arrow-s { border-top-color:#000; }
.tipsy-arrow-e { border-left-color:#000; }
.tipsy-arrow-w { border-right-color:#000; }
.tipsy-n .tipsy-arrow, .tipsy-nw .tipsy-arrow, .tipsy-ne .tipsy-arrow { top:0; border-top:none; }
.tipsy-s .tipsy-arrow, .tipsy-sw .tipsy-arrow, .tipsy-se .tipsy-arrow { bottom:0; border-bottom:none; }
.tipsy-n .tipsy-arrow, .tipsy-s .tipsy-arrow { left:50%; margin-left:-5px; }
.tipsy-nw .tipsy-arrow, .tipsy-sw .tipsy-arrow { left:10px; }
.tipsy-ne .tipsy-arrow, .tipsy-se .tipsy-arrow { right:10px; }
.tipsy-e .tipsy-arrow, .tipsy-w .tipsy-arrow { top:50%; margin-top:-5px; }
.tipsy-e .tipsy-arrow { right:0; border-right:none; }
.tipsy-w .tipsy-arrow { left:0; border-left:none; }
|