comparison war/scripts/jQuery/external/jquery.bgiframe-2.1.2.js @ 3:cf06b77a8bbd

Committed branch of the e4D repos sti-gwt branch 16384. git-svn-id: http://dev.dariah.eu/svn/repos/eu.dariah.de/ap1/sti-gwt-dariah-geobrowser@36 f2b5be40-def6-11e0-8a09-b3c1cc336c6b
author StefanFunk <StefanFunk@f2b5be40-def6-11e0-8a09-b3c1cc336c6b>
date Tue, 17 Jul 2012 13:34:40 +0000
parents
children
comparison
equal deleted inserted replaced
2:2897af43ccc6 3:cf06b77a8bbd
1 /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2 * Licensed under the MIT License (LICENSE.txt).
3 *
4 * Version 2.1.2
5 */
6
7 (function($){
8
9 $.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {
10 s = $.extend({
11 top : 'auto', // auto == .currentStyle.borderTopWidth
12 left : 'auto', // auto == .currentStyle.borderLeftWidth
13 width : 'auto', // auto == offsetWidth
14 height : 'auto', // auto == offsetHeight
15 opacity : true,
16 src : 'javascript:false;'
17 }, s);
18 var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
19 'style="display:block;position:absolute;z-index:-1;'+
20 (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
21 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
22 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
23 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
24 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
25 '"/>';
26 return this.each(function() {
27 if ( $(this).children('iframe.bgiframe').length === 0 )
28 this.insertBefore( document.createElement(html), this.firstChild );
29 });
30 } : function() { return this; });
31
32 // old alias
33 $.fn.bgIframe = $.fn.bgiframe;
34
35 function prop(n) {
36 return n && n.constructor === Number ? n + 'px' : n;
37 }
38
39 })(jQuery);