hello community,
i am using a draggable object "regler" which works fine to drag on the
x axe (it's supposed to be like a volume control) but i want to put a
action on it whenever it gets moved. for this action the position
(distance to left edge) is needed.

i figured out how i can get the position whenever i click on the
object, the next step is to get the live position while it gets
dragged. can anyone help me with this?

your help is much appreciated!

thanks in advance
dirk


#HTML
<div id="crossfader">
 <div id="regler"></div>
</div>

#JS
$(document).ready(function(){
      $("#regler").draggable(
              {
                      containment: 'parent', // only move in parent
object
                      axis: 'x',
              });

      $("#regler").mousedown(function() // should get fired whenever
it get
moved, not clicked
      {
              var position = $("#regler").position();
              console.log( "left: " + position.left);
      });
});

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to