Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Draggable elements in JQUERY

    Hi i am generating dynamically a list of books. Each book should be draggable to a certain place in a page. I gave the same id for all the books by keepin each book reference inside a div element. But only the first element is draggable . Please help me in making all the books in a list to be draggable .
    I am using JQUERY. Please help me out....

  • #2
    Senior Coder tomws's Avatar
    Join Date
    Nov 2007
    Location
    Arkansas
    Posts
    2,644
    Thanks
    29
    Thanked 330 Times in 326 Posts
    If you need help with code, it's useful to actually post some code.
    Are you a Help Vampire?

  • #3
    Regular Coder 2reikis's Avatar
    Join Date
    Nov 2005
    Location
    New Mexico, USA
    Posts
    174
    Thanks
    18
    Thanked 13 Times in 13 Posts

    all the same id?

    You might try giving all the elements you want draggable the same class instead of the same id. The way ids work, there should only ever be one element on a page with a given id. A lot of jQuery functions will return an array when there are more than one element with the same id but I've run across some that won't.

    Some code would help, yes.
    2Reikis
    I did not arrive at my understanding of the physical universe through my rational mind.
    Albert Einstein


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •