moose-en-a-gant Posted January 10, 2015 Share Posted January 10, 2015 I would like to have database entries or rows, be outputted into "panels" with independent x's on them to delete an entry. I think I've got the update / delete stuff figured out, what I don't know is how to hold down an entry and drag it up / down with the other's reacting and then this reorders them eg. updates database ID numbers. Any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/293788-how-do-you-accomplish-dragging/ Share on other sites More sharing options...
kicken Posted January 10, 2015 Share Posted January 10, 2015 You have to use Javascript to do the actual dragging. You do so by using it to adjust the items CSS top and left properties as you move the mouse around the screen. The simplest thing to do would be to use a library that handles it for you such as jQuery UI's Draggable widget. Quote Link to comment https://forums.phpfreaks.com/topic/293788-how-do-you-accomplish-dragging/#findComment-1502365 Share on other sites More sharing options...
Monkuar Posted January 10, 2015 Share Posted January 10, 2015 (edited) You have to use Javascript to do the actual dragging. You do so by using it to adjust the items CSS top and left properties as you move the mouse around the screen. The simplest thing to do would be to use a library that handles it for you such as jQuery UI's Draggable widget. Yeah, I started with Jquery's UI, it's nice. I eventually moved to http://interactjs.io though, this thing is an absolute monster. Very lightweight as well, and doesn't even depend on jquery. Add http://darsa.in/tooltips/ to your movable objects as well, and it becomes simply beautiful. Edited January 10, 2015 by Monkuar Quote Link to comment https://forums.phpfreaks.com/topic/293788-how-do-you-accomplish-dragging/#findComment-1502366 Share on other sites More sharing options...
moose-en-a-gant Posted January 11, 2015 Author Share Posted January 11, 2015 I'm trying to create a wireframe for my website, why am I reinventing the wheel? I don't know... the wheel is not good enough I guess... Anyway, I'm curious how... well I think anything is possible you know... I have this page called "features" which have basic website features like forms, login, file upload, emailing, etc... Ideally people would just drag those over a background / canvas and position it around, nothing new. But what would also be ideal is that when the person preses "save" or "buy" databases are created and assigned to those values... So that rather than placing an order and waiting, the website is ready to go... I know, nothing new I don't look at what services exist already, I know it seems dumb like "Why not check the competition / what exists." Well I try to come up with everything on my own relatively, I mean you guys are helping me by telling me what to do haha but... I don't know... I may have been hired to desing a really basic website for $400.00 can't count my chickens till they hatch but that's really cool. Like a fantasy turned reality... there is a catch though... "endless revision" lol... it's like, oh.... right Quote Link to comment https://forums.phpfreaks.com/topic/293788-how-do-you-accomplish-dragging/#findComment-1502468 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.