mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
whitespace and a comment on setting buttonPlaceholder to undefined
This commit is contained in:
parent
c824b16816
commit
ced1f865a2
1 changed files with 7 additions and 5 deletions
|
|
@ -46,15 +46,17 @@ $.widget( "mobile.button", $.mobile.widget, {
|
|||
// Add hidden input if it doesn’t already exist.
|
||||
if( $buttonPlaceholder === undefined ) {
|
||||
$buttonPlaceholder = $( "<input>", {
|
||||
type: "hidden",
|
||||
name: $el.attr( "name" ),
|
||||
value: $el.attr( "value" )
|
||||
})
|
||||
.insertBefore( $el );
|
||||
type: "hidden",
|
||||
name: $el.attr( "name" ),
|
||||
value: $el.attr( "value" )
|
||||
}).insertBefore( $el );
|
||||
|
||||
// Bind to doc to remove after submit handling
|
||||
$( document ).one("submit", function(){
|
||||
$buttonPlaceholder.remove();
|
||||
|
||||
// reset the local var so that the hidden input
|
||||
// will be re-added on subsequent clicks
|
||||
$buttonPlaceholder = undefined;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue