javascript - which would be the best way to implement movement? -


okay, slider should move in response user pressing mouse button down on thumb knob itself. thumb knob should move along track in response user moving mouse , should stop moving when user releases mouse.

this code far not positive if should use document.onkeydown or use different function implement moving of grey slider inside limited box given?

     <style>      div.parent-item {       width: 400px;      height:50px;      margin: 25px;      border-style: solid;      border-width: 1px;          }        #knob {       width: 50px;       height:50px;        background-color: grey;       margin-left: 25%;            }               }       </style>       </head>       <body>       <h1>in chrome</h1>            <form action="horizontal_form.asp">        <input type="radio" name="angle" value="horizontal" checked>horizontal        <form action="vertical_form">      <input type="radio" name="angle" value="vertical">vertical            </form>       <div class="parent-item">           <div id="knob"></div>         </div> 

view of code - http://jsfiddle.net/xvrhumtc/

but if suggest appreciated!

please don't close question :)


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -