forked from bitovi/jquerypp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrop_test.js
More file actions
41 lines (32 loc) · 916 Bytes
/
drop_test.js
File metadata and controls
41 lines (32 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
steal('funcunit','funcunit/syn').then(function(){
module("jquery/event/drop");
test("new drop added",2, function(){
var div = $("<div>"+
"<div id='drag'></div>"+
"<div id='midpoint'></div>"+
"<div id='drop'></div>"+
"</div>");
div.appendTo($("#qunit-test-area"));
var basicCss = {
width: "20px",
height: "20px",
position: "absolute",
border: "solid 1px black"
}
$("#drag").css(basicCss).css({top: "0px", left: "0px", zIndex: 1000, backgroundColor: "red"})
$("#midpoint").css(basicCss).css({top: "0px", left: "30px"})
$("#drop").css(basicCss).css({top: "0px", left: "60px"});
$('#drag').bind("draginit", function(){});
$("#midpoint").bind("dropover",function(){
ok(true, "midpoint called");
$("#drop").bind("dropover", function(){
ok(true, "drop called");
});
$.Drop.compile();
});
stop();
Syn.drag({to: "#drop"},"drag", function(){
start();
});
});
})