-});\r
-\r
-test("click() context", function() {\r
- $('<li><a href="#">Change location</a></li>').prependTo('#firstUL').find('a').bind('click', function() {\r
- var close = $('spanx', this); // same with $(this).find('span');\r
- ok( close.length == 0, "Element does not exist, length must be zero" );\r
- ok( !close[0], "Element does not exist, direct access to element must return undefined" );\r
- //console.log( close[0]); // it's the <a> and not a <span> element\r
- return false;\r
- }).click();\r
-});\r
-\r
-test("$().html().evalScripts() Eval's Scripts Twice in Firefox, see #975", function() {\r
- expect(1);\r
- $("#main").html('<script type="text/javascript">ok( true, "execute script" );</script>').evalScripts();\r
-});\r
-\r
-test("$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968", function() {\r
- var f = frames["iframe"].document;\r
- f.open();\r
- f.write("<html><body></body></html>");\r
- f.close();\r
- $("<div>Testing</div>").appendTo(f.body);\r
- ok( true, "passed" );\r
-});\r
-\r
-test("Checkbox's state is erased after wrap() action (IE 6), see #769", function() {\r
- expect(3);\r
- stop();\r
- $('#check1').click(function() { \r
- var checkbox = this; \r
- ok( !checkbox.checked );\r
- $(checkbox).wrap( '<div id="c1" style="display:none;"></div>' );\r
- ok( !checkbox.checked );\r
- // use a fade in to check state after this event handler has finished\r
- $("#c1").fadeIn(function() {\r
- ok( checkbox.checked );\r
- start();\r
- });\r
- }).click();\r
- \r