PHP Classes

File: src/MSD/HomeBundle/Resources/public/css/jquery-ui-1.10.3/tests/unit/selectable/selectable_options.js

Recommend this page to a friend!
  Classes of Manolo Salsas   Online PHP Image Transform   src/MSD/HomeBundle/Resources/public/css/jquery-ui-1.10.3/tests/unit/selectable/selectable_options.js   Download  
File: src/MSD/HomeBundle/Resources/public/css/jquery-ui-1.10.3/tests/unit/selectable/selectable_options.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Online PHP Image Transform
Application to do interactive image manipulation
Author: By
Last change:
Date: 4 years ago
Size: 1,180 bytes
 

Contents

Class file image Download
/* * selectable_options.js */ (function($) { module("selectable: options"); test("autoRefresh", function() { expect(3); var actual = 0, el = $("#selectable1"), sel = $("*", el), selected = function() { actual += 1; }; el = $("#selectable1").selectable({ autoRefresh: false, selected: selected }); sel.hide(); el.simulate( "drag", { dx: 1000, dy: 1000 }); equal(actual, sel.length); el.selectable("destroy"); actual = 0; sel.show(); el = $("#selectable1").selectable({ autoRefresh: true, selected: selected }); sel.hide(); el.simulate( "drag", { dx: 1000, dy: 1000 }); equal(actual, 0); sel.show(); $( sel[ 0 ] ).simulate( "drag", { dx: 1000, dy: 1000 }); equal(actual, sel.length); el.selectable("destroy"); sel.show(); }); test("filter", function() { expect(2); var actual =0, el = $("#selectable1"), sel = $("*", el), selected = function() { actual += 1; }; el = $("#selectable1").selectable({ filter: ".special", selected: selected }); el.simulate( "drag", { dx: 1000, dy: 1000 }); ok(sel.length !== 1, "this test assumes more than 1 selectee"); equal(actual, 1); el.selectable("destroy"); }); })(jQuery);