source: other-projects/nz-flag-design/trunk/main-form/bgrins-spectrum/test/loaders.js@ 29741

Last change on this file since 29741 was 29741, checked in by davidb, 9 years ago

Support JS library for colour picker

  • Property svn:executable set to *
File size: 498 bytes
Line 
1
2require.config({
3 paths: {
4 jquery: '../docs/jquery-2.1.0'
5 }
6});
7
8asyncTest ("requirejs", function() {
9 require([
10 "../spectrum"
11 ], function(spectrum) {
12 ok ($.fn.spectrum, "Plugin has been loaded");
13
14 // Just do some basic stuff with the API as a sanity check.
15 var el = $("<input id='spec' />").spectrum();
16 el.spectrum("set", "red");
17 equal(el.spectrum("get").toName(), "red", "Basic color setting");
18 el.spectrum("destroy");
19
20 QUnit.start();
21 });
22});
Note: See TracBrowser for help on using the repository browser.