| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 /* 2 * draggable_events.js 3 */ 4 (function($) { 5 6 module("draggable: events"); 7 8 test("callbacks occurance count", function() { 9 10 expect(3); 11 12 var start = 0, stop = 0, dragc = 0; 13 el = $("#draggable2").draggable({ 14 start: function() { start++; }, 15 drag: function() { dragc++; }, 16 stop: function() { stop++; } 17 }); 18 19 drag(el, 10, 10); 20 21 equals(start, 1, "start callback should happen exactly once"); 22 equals(dragc, 3, "drag callback should happen exactly once per mousemove"); 23 equals(stop, 1, "stop callback should happen exactly once"); 24 25 }); 26 27 })(jQuery);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |