日期:2014-05-16 浏览次数:20321 次
" jslint map! lint !D:\jsl-0.3.0\jsl.exe -process %
<script src="qunit-1.12.0.js"></script> <script src="jquery-1.7.2.js"></script> <script src="../jquery.column.picker.js"></script> <script> test( "test basic envirenment", function() { ok(typeof jQuery === 'function', "jQuery is a function"); ok(typeof $("#monthTable").pickout === 'function', "$('#monthTable').pickout is a function"); }); test( "test pickout selector function", function() { throws( function() {$("#monthTable").pickout()}, /parameter/, "raised error message contains 'parameter' when parameter is empty"); ok($.isArray( $("#monthTable").pickout([0, 1, 3]) ), "column index array parameter is ok"); ok($.isArray( $("#monthTable").pickout("th[name=January],th[name=March]") ), "string selector parameter is ok"); }); test( "test pickout show and hide function, compatible to old", function() { $("#monthTable").pickout({picked: [0, 1, 2]}); ok($("#monthTable").find("tr th:eq(0)").is(":visible"), "pickout show and hide ok"); }); </script>