2009-02-02 14:36:08 +00:00
|
|
|
/*
|
|
|
|
* selectable_events.js
|
|
|
|
*/
|
|
|
|
(function($) {
|
|
|
|
|
|
|
|
module("selectable: events");
|
|
|
|
|
2009-02-04 04:53:09 +00:00
|
|
|
test("start", function() {
|
|
|
|
expect(2);
|
|
|
|
el = $("#selectable1");
|
|
|
|
el.selectable({
|
|
|
|
start: function(ev, ui) {
|
|
|
|
ok(true, "drag fired start callback");
|
|
|
|
equals(this, el[0], "context of callback");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
el.simulate("drag", 20, 20);
|
|
|
|
});
|
|
|
|
|
|
|
|
test("stop", function() {
|
|
|
|
expect(2);
|
|
|
|
el = $("#selectable1");
|
|
|
|
el.selectable({
|
|
|
|
start: function(ev, ui) {
|
|
|
|
ok(true, "drag fired stop callback");
|
|
|
|
equals(this, el[0], "context of callback");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
el.simulate("drag", 20, 20);
|
2009-02-02 14:36:08 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
})(jQuery);
|