Hello, I don't think this is in the dev bug list or if I'm doing something wrong but here is the problem : When you move the cursor quickly to far right or far left it seems to show the wrong value ... Is there a way to make sure that the slider gives the correct value while sliding ? Sometimes the value is only wrong by a few decemals but sometimes it can be more. Any ideas ?
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <link
- href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
- rel="stylesheet" type="text/css"/>
- <style>
- #debug { display:block; width : 200px; height : 100px; position
- : fixed; bottom : 0; right : 0;
- color : #FFF; background-color : #333; z-index : 999;
- text-align : center; }
- #debug p { padding-top : 10px; }
- #slider { display : block; width : 640px; margin : 10px auto; }
- </style>
- <script
- src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
- <script
- src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#slider").slider({
- slide: function(event, ui) {
- $('#debug').html('<p>'+ $(this).slider('value')
- +'</p>');
- }, min : 0, max : 36
- });
- });
- </script>
- </head>
- <body>
- <div id="slider"></div>
- <div id="debug"></div>
- </body>
- </html>