<div id="main" style="position: absolute; top: -10000px; left: -10000px;">
- <div id="list1">
- <a>There is one obvious advantage:</a>
- <div>
- <p>
- You've seen it coming!
- <br/>
- Buy now and get nothing for free!
- <br/>
- Well, at least no free beer. Perhaps a bear, if you can afford it.
- </p>
- </div>
- <a>Now that you've got...</a>
- <div>
- <p>
- your bear, you have to admit it!
- <br/>
- No, we aren't selling bears.
- </p>
- <p>
- We could talk about renting one.
- </p>
- </div>
- <a>Rent one bear, ...</a>
- <div>
- <p>
- get two for three beer.
- </p>
- <p>
- And now, for something completely different.
- </p>
- </div>
+ <div>
+ <div id="list1" class="foo">
+ <a class="bar">There is one obvious advantage:</a>
+ <div style="" class="foo">
+ <p>
+ You've seen it coming!
+ <br/>
+ Buy now and get nothing for free!
+ <br/>
+ Well, at least no free beer. Perhaps a bear, if you can afford it.
+ </p>
+ </div>
+ <a class="bar">Now that you've got...</a>
+ <div style="" class="foo">
+ <p>
+ your bear, you have to admit it!
+ <br/>
+ No, we aren't selling bears.
+ </p>
+ <p>
+ We could talk about renting one.
+ </p>
+ </div>
+ <a class="bar">Rent one bear, ...</a>
+ <div style="" class="foo">
+ <p>
+ get two for three beer.
+ </p>
+ <p>
+ And now, for something completely different.
+ </p>
+ </div>
+ </div>
</div>
<div id="navigationWrapper">
});
test("destroy", function() {
- $("<div></div>").appendTo('body').accordion().accordion("destroy").remove();
- ok(true, '.accordion("destroy") called on element');
-
- $([]).accordion().accordion("destroy").remove();
- ok(true, '.accordion("destroy") called on empty collection');
-
- $('<div></div>').accordion().accordion("destroy").remove();
- ok(true, '.accordion("destroy") called on disconnected DOMElement');
-
- $('<div></div>').accordion().accordion("destroy").accordion("foo").remove();
- ok(true, 'arbitrary method called after destroy');
-
- var expected = $('<div></div>').accordion(),
- actual = expected.accordion('destroy');
- equals(actual, expected, 'destroy is chainable');
+ var beforeHtml = $("#list1").parent().html();
+ var afterHtml = $("#list1").accordion().accordion("destroy").parent().html();
+ equal( afterHtml, beforeHtml );
});
test("enable", function() {