Surjit Sidhu
Surjit Sidhu

Reputation: 387

Jquery ui div not draggable on dropped

I facing problem, when i drag drop outer video div into timeline then it's not longer draggable

https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2/show/

https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2

I'm not sure, why it's freezing

Upvotes: 0

Views: 408

Answers (1)

Parminder Singh
Parminder Singh

Reputation: 351

Your code seems missing draggable.

See this code:

if( dropped.attr( 'id' ) === 'galleryItem' ) {
            //alert("dropped if");
            var newEl = $( dropped ).clone().appendTo( droppedOn );

            newEl.removeAttr( 'id' ).removeClass( 'thumb' ).html( '<div style="background:red;width:400px;height:50px;"></div>' ).addClass( 'layer-item' );
            newEl.removeClass( 'dragging' );

            newEl.addClass("item");
            $(".item").removeClass("ui-draggable draggable");
            $(".item").draggable({
                cursor: 'move',     
            });

        } else {
            //alert("dropped else");
            $( dropped ).detach().css( { top: 0, left: ui.helper.position().left - 160 } ).appendTo( droppedOn );
        }

Upvotes: 1

Related Questions