});
testoffset("scroll", function( jQuery, win ) {
- expect(12);
+ expect(16);
var ie = jQuery.browser.msie && parseInt( jQuery.browser.version ) < 8;
equals( jQuery(win.document).scrollTop(), 1000, "jQuery(document).scrollTop()" );
equals( jQuery(win.document).scrollLeft(), 1000, "jQuery(document).scrollLeft()" );
+
+ // test jQuery using parent window/document
+ // jQuery reference here is in the iframe
+ window.scrollTo(0,0);
+ equals( jQuery(window).scrollTop(), 0, "jQuery(window).scrollTop() other window" );
+ equals( jQuery(window).scrollLeft(), 0, "jQuery(window).scrollLeft() other window" );
+ equals( jQuery(document).scrollTop(), 0, "jQuery(window).scrollTop() other document" );
+ equals( jQuery(document).scrollLeft(), 0, "jQuery(window).scrollLeft() other document" );
});
testoffset("body", function( jQuery ) {