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
  •