Jump to content



Photo

Static Drag and Drop JavaScript (jQuery too)?

javascript drag and drop

  • Please log in to reply
4 replies to this topic

#1 Jose_49

Jose_49

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 30-July 09

Posted 04 May 2013 - 15:07

'morning! or whatever your current timezone is ;)

First of all, I know that if I do some simple googling I could get a plethora of results on this topic.

But, what I am seeking is different, and I need some help.

I am trying to do a somewhat interactive carousel, which you can actually move the position of the images from one point to the other.

But, I'm not looking for something complex or eye candy. I mean, it does not need to have a wooshing effect each time the user moves the image. I am also not looking for another carousel. I am using jqCarousel and I am happy with it.

What I need to know is how can I detect that a image has been taken (drag start), and that image is dropped in another part of the carousel, so I just need to do some javascript code to swap the image source and be done with it.

Thanks a lot in advance.


P.S. You know that when you drag an image on any browser you see a "ghostly " representation of itself. That will suffice for me. Just need to know a handler that will allow me to detect where it will drop.


#2 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 04 May 2013 - 15:20

Perhaps you're already aware, but is jQuery UI's draggable function not what you're looking for?
http://jqueryui.com/draggable/

#3 OP Jose_49

Jose_49

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 30-July 09

Posted 04 May 2013 - 15:26

Perhaps you're already aware, but is jQuery UI's draggable function not what you're looking for?
http://jqueryui.com/draggable/

Thanks. Indeed, I am aware of it. But I do not know how to adapt it. As you can see it does possess those fancy effects which are currently unavailable to the carousel (since it wasn't designed for that). Meaning it would be very difficult to me to adapt it. I have looked at the carousel code, but I rather not mess with it :p

#4 threetonesun

threetonesun

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 26-February 02

Posted 04 May 2013 - 16:06

Are you using jCarousel or jq.Carousel? It seems there's a lot of them out there with similar names... :laugh:

http://5509.github.i...arousel/#sample

#5 OP Jose_49

Jose_49

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 30-July 09

Posted 15 May 2013 - 15:32

Are you using jCarousel or jq.Carousel? It seems there's a lot of them out there with similar names... :laugh:

http://5509.github.i...arousel/#sample


jqCarousel :p.

Sorry for the late reply, XD