EasyUI Forum
November 06, 2025, 03:59:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to drop in same position?  (Read 8557 times)
contestant
Newbie
*
Posts: 40


View Profile Email
« on: August 13, 2015, 02:53:07 PM »

Hi
How can drop an element to same position that drag on it?
In the other words, How can get the current dragged element position to recreate it in same position.
Thanks Wink
Logged
contestant
Newbie
*
Posts: 40


View Profile Email
« Reply #1 on: August 14, 2015, 01:57:14 PM »

Thank's for your very quick answer.
I fixed it myself as below:

var obj = $(source).draggable('proxy');
                if(obj)
                    elm.css({ position:'absolute', left:obj.css("left").replace(/px/, "") - $("#content").offset().left, top:obj.css("top").replace(/px/, "") - $("#content").offset().top});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!