Jquery draggable persistence either through mysql or saving cookie in the database?

Posted by Muhammad Jehanzaib on Stack Overflow See other posts from Stack Overflow or by Muhammad Jehanzaib
Published on 2010-05-11T16:57:08Z Indexed on 2010/05/11 17:04 UTC
Read the original article Hit count: 341

I want to know that how can I persist the divs dropped on a draggable. I have been trying since long but stuck at this point. Actually you can see the demo here. I have to save the user designed wedding floor. So whenever user logins next time he/ she is able to see the last design saved. The code is shown below:


                                             $(document).ready(function() {
                                                $("#droppable").droppable({
                                                    accept: '.draggable',
                                                    drop: function(event, ui) {
                                                            $(this).append($(ui.draggable).clone());
                                                            $("#droppable .draggable").addClass("objects");
                                                            $(".objects").removeClass("ui-draggable draggable");
                                                            $(".objects").draggable({
                                                                    containment: 'parent',
                                                            });
                                                    }
                                                });
                                                $(".draggable").draggable({
                                                    helper: 'clone',
                                                    tolerance: 'touch',
                                                    cursor:'move'
                                                });

});


© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about draggable