Jump to content

Drag and drog sortable list question


simplest

Recommended Posts

I am using jQuery draggable and sortable list the first time and it seems the sortable list is working.

However I am having 2 issues:

 

  1. There is this black dot beside the sortable list. Even I add
    list-style-type: none;
    

    to the #sortable CSS but it does not seems to work.

  2. When I try to drag the content box below the sortable list to it, the div goes into the list, but loses all the styles. Is this a normal behaviour? Is it possible to keep the style while keep it as a sortable list items?

Here is the jsFiddle I put up: https://jsfiddle.net/3fa24d0p/

 

Thanks in advance.

Link to comment
Share on other sites

Thank for the help @dustcomposer

 

I have changed the # to dot selector and the bullets are gone now.

I am still wondering is it possible to have the content box div goes into the sortable list while keeping the styles applied to it?...

Link to comment
Share on other sites

If the styles are applied by a CSS selector and after dragging the element the selector no longer matches the element then the styles will be lost.

 

It would seem jQuery is stripping the ID attribute from the element when dragging it.

Link to comment
Share on other sites

If the styles are applied by a CSS selector and after dragging the element the selector no longer matches the element then the styles will be lost.

 

It would seem jQuery is stripping the ID attribute from the element when dragging it.

 

Thanks for the info. I assume this is the limitation of jQuery itself and not a bug?...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...