test for enhanceWithin use

This commit is contained in:
John Bender 2011-10-10 13:50:06 -07:00
parent aa16aec358
commit 63ab61cb89
2 changed files with 12 additions and 4 deletions

View file

@ -115,5 +115,10 @@
ok( $("#enhancetest").trigger("create").find(".ui-checkbox").length, "enhancements applied" );
});
$.mobile.page.prototype.options.keepNative = "select.should-be-native";
// not testing the positive case here since's it's obviously tested elsewhere
test( "checkboxradio elements in the keepNative set shouldn't be enhanced", function() {
ok( !$("#input.should-be-native").parent().is("div.ui-checkbox") );
});
})(jQuery);

View file

@ -75,10 +75,13 @@
</fieldset>
</div>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend>Agree to the terms:</legend>
<input type="checkbox" name="checkbox-1" id="checkbox-1" class="should-be-native" />
<label for="checkbox-1">I agree</label>
</fieldset>
</div>
</div>