Content/jqueryui/tests/unit/core/core.js
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
(function( $ ) {
module( "core - jQuery extensions" );
TestHelpers.testJshint( "core" );
asyncTest( "focus - original functionality", function() {
expect( 1 );
$( "#inputTabindex0" )
.one( "focus", function() {
ok( true, "event triggered" );
start();
})
.focus();
});
asyncTest( "focus", function() {
expect( 2 );
$( "#inputTabindex0" )
.one( "focus", function() {
ok( true, "event triggered" );
start();
})
.focus( 500, function() {
ok( true, "callback triggered" );
});
});
test( "zIndex", function() {
expect( 7 );
var el = $( "#zIndexAutoWithParent" ),
parent = el.parent();
equal( el.zIndex(), 100, "zIndex traverses up to find value" );
equal( parent.zIndex(200 ), parent, "zIndex setter is chainable" );
equal( el.zIndex(), 200, "zIndex setter changed zIndex" );
el = $( "#zIndexAutoWithParentViaCSS" );
equal( el.zIndex(), 0, "zIndex traverses up to find CSS value, not found because not positioned" );
el = $( "#zIndexAutoWithParentViaCSSPositioned" );
equal( el.zIndex(), 100, "zIndex traverses up to find CSS value" );
el.parent().zIndex( 200 );
equal( el.zIndex(), 200, "zIndex setter changed zIndex, overriding CSS" );
equal( $( "#zIndexAutoNoParent" ).zIndex(), 0, "zIndex never explicitly set in hierarchy" );
});
test( "innerWidth - getter", function() {
expect( 2 );
var el = $( "#dimensions" );
equal( el.innerWidth(), 122, "getter passthru" );
el.hide();
equal( el.innerWidth(), 122, "getter passthru when hidden" );
});
test( "innerWidth - setter", function() {
expect( 2 );
var el = $( "#dimensions" );
后面还有 125 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
