1 Replies - 9873 Views - Last Post: 12 April 2011 - 06:16 AM

#1 hockey97   User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Is it possible for Jquery to drag and drop a input ?

Posted 10 April 2011 - 08:32 PM

Hi, I got a few input images and want them to be dragable. I am creating a gui for clients to drag and drop elements around to create their own page.

any ideas how to do this? I did add the drag effect to these but no input would be draggable even though the class is added to the element. Any ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: Is it possible for Jquery to drag and drop a input ?

#2 codeprada   User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 963
  • View blog
  • Posts: 2,382
  • Joined: 15-February 11

Re: Is it possible for Jquery to drag and drop a input ?

Posted 12 April 2011 - 06:16 AM

Place all your items in DIV's then make their position absolute.

And then use a code similar to this to move the elements around.
$("#element").mousedown(function(event){
   $(this).css('left', event.pageX);
   $(this).css('top', event.pageY);
});

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1