optikalefx Posted February 12, 2008 Share Posted February 12, 2008 i made this dragging script that lets u drag elements on a page around for fun. i have a few versions, one is all relative position. one is absolute. but absolute doesnt work. in this example i made, it sets a style to all dragable elements. it sets its position to relative. Then the drag script uses the mouse coords and the object width and position to drag. the problem is, if you leave elements dragged with relative position, they wrap with the page and become stupid and obnoxious. and not where u placed them. so i tried to set the object u clicked on to absolute. that works except the text under the object moves into its position. not good. so i said ok once u place the object then it sets absolute position. it seems as soon as you set an element to absolute position the elements around it populate the old area. if you go to www.4tenonline.com/lookatme.htm you can see what i mean. click the background, then again, and then u can drag say the top green text. but as youll see the text beneath that moves too. when i set the script to not set any absolute position, it works fine. except for relative postition sucks when your placing elements. i tried to set all dragable elements to their absolute position. but i couldnt get it to set. i have 2 functions getX() and getY() that get an elements absolute position. so i can set it. Im able to set every single left and top for each element, but as soon as i set absolute to them, the x and y gets screwed up. idk Quote Link to comment https://forums.phpfreaks.com/topic/90712-help-with-stupid-html-text/ Share on other sites More sharing options...
nogray Posted February 12, 2008 Share Posted February 12, 2008 http://docs.mootools.net/Drag/Drag-Move.js Quote Link to comment https://forums.phpfreaks.com/topic/90712-help-with-stupid-html-text/#findComment-465106 Share on other sites More sharing options...
optikalefx Posted February 12, 2008 Author Share Posted February 12, 2008 thanks, cool site. but im making my own. Quote Link to comment https://forums.phpfreaks.com/topic/90712-help-with-stupid-html-text/#findComment-465338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.