@@ 3786-3802 (lines=17) @@ | ||
3783 | ||
3784 | function datepicker_getZindex( elem ) { |
|
3785 | var position, value; |
|
3786 | while ( elem.length && elem[ 0 ] !== document ) { |
|
3787 | // Ignore z-index if position is set to a value where z-index is ignored by the browser |
|
3788 | // This makes behavior of this function consistent across browsers |
|
3789 | // WebKit always returns auto if the element is positioned |
|
3790 | position = elem.css( "position" ); |
|
3791 | if ( position === "absolute" || position === "relative" || position === "fixed" ) { |
|
3792 | // IE returns 0 when zIndex is not specified |
|
3793 | // other browsers return a string |
|
3794 | // we ignore the case of nested elements with an explicit value of 0 |
|
3795 | // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> |
|
3796 | value = parseInt( elem.css( "zIndex" ), 10 ); |
|
3797 | if ( !isNaN( value ) && value !== 0 ) { |
|
3798 | return value; |
|
3799 | } |
|
3800 | } |
|
3801 | elem = elem.parent(); |
|
3802 | } |
|
3803 | ||
3804 | return 0; |
|
3805 | } |
|
@@ 257-273 (lines=17) @@ | ||
254 | ||
255 | if ( this.length ) { |
|
256 | var elem = $( this[ 0 ] ), position, value; |
|
257 | while ( elem.length && elem[ 0 ] !== document ) { |
|
258 | // Ignore z-index if position is set to a value where z-index is ignored by the browser |
|
259 | // This makes behavior of this function consistent across browsers |
|
260 | // WebKit always returns auto if the element is positioned |
|
261 | position = elem.css( "position" ); |
|
262 | if ( position === "absolute" || position === "relative" || position === "fixed" ) { |
|
263 | // IE returns 0 when zIndex is not specified |
|
264 | // other browsers return a string |
|
265 | // we ignore the case of nested elements with an explicit value of 0 |
|
266 | // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> |
|
267 | value = parseInt( elem.css( "zIndex" ), 10 ); |
|
268 | if ( !isNaN( value ) && value !== 0 ) { |
|
269 | return value; |
|
270 | } |
|
271 | } |
|
272 | elem = elem.parent(); |
|
273 | } |
|
274 | } |
|
275 | ||
276 | return 0; |