Jump to content
simplest

Drag and drog sortable list question

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.

Share this post


Link to post
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?...

Share this post


Link to post
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.

Share this post


Link to post
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?...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...