1 |
/* |
2 |
* droppable_core.js |
3 |
*/ |
4 |
|
5 |
(function($) { |
6 |
|
7 |
module("droppable: core"); |
8 |
|
9 |
test("element types", function() { |
10 |
var typeNames = ("p,h1,h2,h3,h4,h5,h6,blockquote,ol,ul,dl,div,form" + |
11 |
",table,fieldset,address,ins,del,em,strong,q,cite,dfn,abbr" + |
12 |
",acronym,code,samp,kbd,var,img,hr" + |
13 |
",input,button,label,select,iframe").split(","); |
14 |
|
15 |
expect( typeNames.length ); |
16 |
|
17 |
$.each(typeNames, function(i) { |
18 |
var typeName = typeNames[i], |
19 |
el = $(document.createElement(typeName)).appendTo("body"); |
20 |
|
21 |
(typeName === "table" && el.append("<tr><td>content</td></tr>")); |
22 |
el.droppable(); |
23 |
TestHelpers.droppable.shouldDrop(); |
24 |
el.droppable("destroy"); |
25 |
el.remove(); |
26 |
}); |
27 |
}); |
28 |
|
29 |
})(jQuery); |