1 (function( $, undefined ) {
3 // filter function removes whitespace between label and form element so we can use inline-block (nodeType 3 = text)
4 $.fn.fieldcontain = function( options ) {
6 .addClass( "ui-field-contain ui-body ui-br" )
7 .contents().filter( function() {
8 return ( this.nodeType === 3 && !/\S/.test( this.nodeValue ) );
12 //auto self-init widgets
13 $.mobile.$document.bind( "pagecreate create", function( e ) {
14 $( ":jqmData(role='fieldcontain')", e.target ).jqmEnhanceable().fieldcontain();