Permalink
Show file tree
Hide file tree
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Slider: Add demo for custom handle
Fixes #15023 Closes gh-1740
- Loading branch information
1 parent
57bff49
commit 51461d523868c168f2e12eeb547c1cf8b7cf59cf
Showing
5 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>jQuery UI Slider - Custom handle</title> | ||
<link rel="stylesheet" href="../../themes/base/all.css"> | ||
<link rel="stylesheet" href="../demos.css"> | ||
<style> | ||
#custom-handle { | ||
width: 3em; | ||
height: 1.6em; | ||
top: 50%; | ||
margin-top: -.8em; | ||
text-align: center; | ||
line-height: 1.6em; | ||
} | ||
</style> | ||
<script src="../../external/requirejs/require.js"></script> | ||
<script src="../bootstrap.js"> | ||
var handle = $( "#custom-handle" ); | ||
$( "#slider" ).slider({ | ||
create: function() { | ||
handle.text( $( this ).slider( "value" ) ); | ||
}, | ||
slide: function( event, ui ) { | ||
handle.text( ui.value ); | ||
} | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="slider"> | ||
<div id="custom-handle" class="ui-slider-handle"></div> | ||
</div> | ||
|
||
<div class="demo-description"> | ||
<p>The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51461d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have dynamic multiple input and dynamic slider handle so when on change input text value need to set slider value but I can't set slider handle check below code .