Tokentextarea: Fix issues
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / tests / unit / navbar / navbar_core.js
1 /*
2  * mobile navbar unit tests
3  */
4 (function($){
5         test( "navbar button gets active button class when clicked", function() {
6                 var link = $("#disabled-btn-click a:not(.ui-disabled)").first();
7
8                 link.click();
9                 ok( link.hasClass($.mobile.activeBtnClass), "link has active button class" );
10         });
11
12         test( "disabled navbar button doesn't add active button class when clicked", function() {
13                 var link = $("#disabled-btn-click a.ui-disabled").first();
14
15                 link.click();
16                 ok( !link.hasClass($.mobile.activeBtnClass), "link doesn't have active button class" );
17         });
18
19         test( "grids inside an ignored container do not enhance", function() {
20                 var $ignored = $( "#ignored-grid" ), $enhanced = $( "#enhanced-grid" );
21
22                 $.mobile.ignoreContentEnabled = true;
23
24                 $("#foo").trigger( "create" );
25
26                 same( $ignored.attr( "class" ), undefined, "ignored list doesn't have the grid theme" );
27                 same( $enhanced.attr( "class" ).indexOf("ui-grid"), 0, "enhanced list has the grid theme" );
28
29                 $.mobile.ignoreContentEnabled = false;
30         });
31 })(jQuery);