diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-08-05 13:30:55 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-08-05 13:30:55 +0000 |
commit | 5e89481ab851e28380f10675f6620345150c3007 (patch) | |
tree | 4fd58d0e39f5c0359db341044ecf2e70159cb11f /tests/unit/core | |
parent | 44d3893daaa2675aabbeabfe71719b040ff3f999 (diff) | |
download | jquery-ui-5e89481ab851e28380f10675f6620345150c3007.tar.gz jquery-ui-5e89481ab851e28380f10675f6620345150c3007.zip |
Added zIndex method. Fixes #4709 - Add zIndex setter/getter method.
Diffstat (limited to 'tests/unit/core')
-rw-r--r-- | tests/unit/core/core.html | 5 | ||||
-rw-r--r-- | tests/unit/core/core.js | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/core/core.html b/tests/unit/core/core.html index f6c3bccd8..71d06b29a 100644 --- a/tests/unit/core/core.html +++ b/tests/unit/core/core.html @@ -93,6 +93,11 @@ </div> <div id="aria"></div> + + <div id="zIndex100" style="z-index: 100;"> + <div id="zIndexAutoWithParent"></div> + </div> + <div id="zIndexAutoNoParent"></div> </div> </body> diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index 96a197aa5..f26257053 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -48,4 +48,13 @@ test('focus', function() { other.focus(); }); +test('zIndex', function() { + var el = $('#zIndexAutoWithParent'); + equals(el.zIndex(), 100, 'zIndex traverses up to find value'); + equals(el.zIndex(200), el, 'zIndex setter is chainable'); + equals(el.zIndex(), 200, 'zIndex setter changed zIndex'); + + equals($('#zIndexAutoNoParent').zIndex(), 0, 'zIndex never explicitly set in hierarchy'); +}); + })(jQuery); |