1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
* menu_options.js
*/
(function($) {
module("menu: options");
test( "{ disabled: true }", function() {
expect( 2 );
var menu = $( "#menu1" ).menu({
disabled: true,
select: function(event, ui) {
menu_log();
}
});
ok(menu.is(".ui-state-disabled"),"Missing ui-state-disabled class");
menu_log("click",true);
menu_click(menu,"1");
menu_log("afterclick");
equal( $("#log").html(), "afterclick,click,", "Click order not valid.");
});
test( "{ disabled: false }", function() {
expect( 2 );
var menu = $( "#menu1" ).menu({
disabled: false,
select: function(event, ui) {
menu_log();
}
});
ok(menu.not(".ui-state-disabled"),"Has ui-state-disabled class");
menu_log("click",true);
menu_click(menu,"1");
menu_log("afterclick");
equal( $("#log").html(), "afterclick,1,click,", "Click order not valid.");
});
})(jQuery);
|