Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Tokens
    0

    Default Scriptaculous Dragging

    Hey,

    When using scriptaculous to drag a div, how can I make it show me or alert me the x and y co-ordinates when finished?

    Thanks for help

  2. #2
    Join Date
    Aug 2006
    Location
    Manchester, UK
    Posts
    2,016
    Tokens
    141
    Habbo
    florx

    Latest Awards:

    Default

    HTML Code:
     new Draggable('DIVNAME',{onEnd:function(){
    var x = document.getElementById('DIVNAME').style.left;
    var y = document.getElementById('DIVNAME').style.top;
    alert('X='+x+' Y='+y);
    },
        
        revert:false
      });

    Try that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •