mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Progressbar demos: Cleanup.
This commit is contained in:
parent
24d9141597
commit
a5d50da591
@ -16,27 +16,27 @@
|
|||||||
});
|
});
|
||||||
$( "button" ).on( "click", function( event ) {
|
$( "button" ).on( "click", function( event ) {
|
||||||
var target = $( event.target ),
|
var target = $( event.target ),
|
||||||
pbar = $( "#progressbar" ),
|
progressbar = $( "#progressbar" ),
|
||||||
pbarValue = pbar.find( ".ui-progressbar-value" );
|
progressbarValue = progressbar.find( ".ui-progressbar-value" );
|
||||||
|
|
||||||
if ( target.is( "#numButton" ) ) {
|
if ( target.is( "#numButton" ) ) {
|
||||||
pbar.progressbar( "option", {
|
progressbar.progressbar( "option", {
|
||||||
value: Math.floor( Math.random() * 100 )
|
value: Math.floor( Math.random() * 100 )
|
||||||
});
|
});
|
||||||
} else if ( target.is( "#colorButton" ) ) {
|
} else if ( target.is( "#colorButton" ) ) {
|
||||||
pbarValue.css({
|
progressbarValue.css({
|
||||||
"background": '#' + Math.floor( Math.random() * 16777215 ).toString( 16 )
|
"background": '#' + Math.floor( Math.random() * 16777215 ).toString( 16 )
|
||||||
});
|
});
|
||||||
} else if ( target.is( "#falseButton" ) ) {
|
} else if ( target.is( "#falseButton" ) ) {
|
||||||
pbar.progressbar( "option", "value", false );
|
progressbar.progressbar( "option", "value", false );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#progressbar .ui-progressbar-value {
|
#progressbar .ui-progressbar-value {
|
||||||
background-color: #CCCCCC;
|
background-color: #ccc;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user