MediaWiki:Wikiminiatlas.js: Difference between revisions
(use <tag> for creation, and full <tag></tag> in parsing, remove redundant "> 0") |
(quick close tag in create mode per jquery docs and faint recollections of an IE bug) |
||
Line 407: | Line 407: | ||
}).append(mapbutton); | }).append(mapbutton); | ||
$(link).wrap( | $(link).wrap( | ||
$('<span>') | $('<span/>') | ||
.css( { position: 'relative', whiteSpace: 'nowrap' } ) | .css( { position: 'relative', whiteSpace: 'nowrap' } ) | ||
.mouseleave( function () { tooltip.fadeOut() } ) | .mouseleave( function () { tooltip.fadeOut() } ) | ||
Line 416: | Line 416: | ||
// insert icon directly | // insert icon directly | ||
ws = $(link).css('whiteSpace'); | ws = $(link).css('whiteSpace'); | ||
$(link).wrap( $('<span>').css('whiteSpace', 'nowrap') ).css('whiteSpace', ws).before(mapbutton); | $(link).wrap( $('<span/>').css('whiteSpace', 'nowrap') ).css('whiteSpace', ws).before(mapbutton); | ||
} | } | ||
Line 557: | Line 557: | ||
// prepare iframe to house the map | // prepare iframe to house the map | ||
if ( coordinates !== null ) { | if ( coordinates !== null ) { | ||
wi.div = $('<div>').css( { | wi.div = $('<div/>').css( { | ||
width: (wc.width+2)+'px', height: (wc.height+2)+'px', | width: (wc.width+2)+'px', height: (wc.height+2)+'px', | ||
margin: '0px', padding: '0px', | margin: '0px', padding: '0px', | ||
Line 572: | Line 572: | ||
// cover the iframe to prevent loosing the mouse to the iframe during resizing | // cover the iframe to prevent loosing the mouse to the iframe during resizing | ||
wi.resizehelper = $('<div>').css( { position: 'absolute', top:0, left:0, zIndex: 20 } ).hide(); | wi.resizehelper = $('<div/>').css( { position: 'absolute', top:0, left:0, zIndex: 20 } ).hide(); | ||
wi.closebutton = $('<img>').attr( { | wi.closebutton = $('<img>').attr( { | ||
Line 581: | Line 581: | ||
} ).click( function(e) { wi.div.hide() } ); | } ).click( function(e) { wi.div.hide() } ); | ||
wi.iframe = $('<iframe>').attr( { | wi.iframe = $('<iframe/>').attr( { | ||
scrolling: 'no', | scrolling: 'no', | ||
frameBorder : 0 | frameBorder : 0 | ||
Line 599: | Line 599: | ||
} | } | ||
wi.div.append( | wi.div.append( | ||
$('<div>') | $('<div/>') | ||
.css( { | .css( { | ||
zIndex : 15, position : 'absolute', bottom : '3px', | zIndex : 15, position : 'absolute', bottom : '3px', |