sisyphus.js
function( field, resque ) {
					if ( field.attr( "name" ) === undefined && field.attr( "id" ) === undefined ) {
						return false;
					}
					var name = field.attr( "name" );
					if ( field.is( ":checkbox" ) && resque !== "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", true );
					} else if( field.is( ":checkbox" ) && resque === "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", false );
					} else if ( field.is( ":radio" ) ) {
						if ( field.val() === resque ) {
							field.prop( "checked", true );
						}
					} else if ( name === undefined || name.indexOf( "[" ) === -1 ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.val( resque );
					} else {
						resque = resque.split( "," );
						field.val( resque );
					}
				}
function( field, resque ) {
					if ( field.attr( "name" ) === undefined && field.attr( "id" ) === undefined ) {
						return false;
					}
					var name = field.attr( "name" );
					if ( field.is( ":checkbox" ) && resque !== "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", true );
					} else if( field.is( ":checkbox" ) && resque === "false" && ( name === undefined || name.indexOf( "[" ) === -1 ) ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.prop( "checked", false );
					} else if ( field.is( ":radio" ) ) {
						if ( field.val() === resque ) {
							field.prop( "checked", true );
						}
					} else if ( name === undefined || name.indexOf( "[" ) === -1 ) {
						// If we aren't named by name (e.g. id) or we aren't in a multiple element field
						field.val( resque );
					} else {
						resque = resque.split( "," );
						field.val( resque );
					}
				}
function ( field , resque ) { if ( field . attr ( "name" ) === undefined && field . attr ( "id" ) === undefined ) { return false ; } var name = field . attr ( "name" ) ; if ( field . is ( ":checkbox" ) && resque !== "false" && ( name === undefined || name . indexOf ( "[" ) === - 1 ) ) { // If we aren't named by name (e.g. id) or we aren't in a multiple element field field . prop ( "checked" , true ) ; } else if ( field . is ( ":checkbox" ) && resque === "false" && ( name === undefined || name . indexOf ( "[" ) === - 1 ) ) { // If we aren't named by name (e.g. id) or we aren't in a multiple element field field . prop ( "checked" , false ) ; } else if ( field . is ( ":radio" ) ) { if ( field . val ( ) === resque ) { field . prop ( "checked" , true ) ; } } else if ( name === undefined || name . indexOf ( "[" ) === - 1 ) { // If we aren't named by name (e.g. id) or we aren't in a multiple element field field . val ( resque ) ; } else { resque = resque . split ( "," ) ; field . val ( resque ) ; } }
Restore form field data from local storage

@param Object field		jQuery form element object
@param String resque	 previously stored fields data

@return void
Restore form field data from local storage