Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Problem with cloning a element using jquery ui

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40227
    vanilson
    Participant

    Guys, I really don´t know what I´m doing wrong in this code. I´m playing around with drag and drop and I´m trying to clone a element but the element doesn´t clone. Here´s the code:

    $(document).ready(function(){
    $(‘#draggable’).draggable({
    helper: ‘clone’
    });
    });
    I only got one div.

    #111688
    Mottie
    Member

    Check out [this demo](http://jsfiddle.net/Mottie/yzwLZ/).

    I used `mydraggable` as the class name of the div so that the clone would have the same styling.

    Make sure that jQuery, jQuery UI and jQuery UI css is loaded.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.