simplest Posted May 2, 2016 Share Posted May 2, 2016 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: 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. 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 More sharing options...
dustcomposer Posted May 2, 2016 Share Posted May 2, 2016 Hi, on the CSS, use dot (.) selector for 'sortable' instead of (#) because it's a class. Link to comment Share on other sites More sharing options...
simplest Posted May 2, 2016 Author Share Posted May 2, 2016 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 More sharing options...
Ingolme Posted May 2, 2016 Share Posted May 2, 2016 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 More sharing options...
simplest Posted May 3, 2016 Author Share Posted May 3, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now