2 * mobile navbar unit tests
5 test( "navbar button gets active button class when clicked", function() {
6 var link = $("#disabled-btn-click a:not(.ui-disabled)").first();
9 ok( link.hasClass($.mobile.activeBtnClass), "link has active button class" );
12 test( "disabled navbar button doesn't add active button class when clicked", function() {
13 var link = $("#disabled-btn-click a.ui-disabled").first();
16 ok( !link.hasClass($.mobile.activeBtnClass), "link doesn't have active button class" );
19 test( "grids inside an ignored container do not enhance", function() {
20 var $ignored = $( "#ignored-grid" ), $enhanced = $( "#enhanced-grid" );
22 $.mobile.ignoreContentEnabled = true;
24 $("#foo").trigger( "create" );
26 deepEqual( $ignored.attr( "class" ), undefined, "ignored list doesn't have the grid theme" );
27 deepEqual( $enhanced.attr( "class" ).indexOf("ui-grid"), 0, "enhanced list has the grid theme" );
29 $.mobile.ignoreContentEnabled = false;