简体   繁体   中英

Expanding the jQuery Sortable Dropzone

I am using jQuery sortable to create areas that list items can be dropped onto from a source list. In my destination zones, I have a ul with a class that acts as the dropzone. However, this ul is within a bootstrap panel-body and further narrows down where the item can be dropped.

My goal is to figure out how to drop the item anywhere on the panel and have it be appended to the end of the ul within the panel-body .

This is what my source / destination look like: 在此处输入图片说明

When I drag an item from the source to the destination (Export Fields) you will see below that the placeholder is shown within the panel body. 在此处输入图片说明

As it stands, everything is functioning but I am trying to make it a little more user friendly so an item from the left can be dropped on any panel on the right and it will automatically append it to the end of the ul without the user having to drag the li to the specific ul dropzone.

Any tips on how I can achieve this?

Here is a fiddle of my setup: https://jsfiddle.net/tdhkzsfm/

    tolerance: 'pointer',

This option will help you a little bit..It won't require 50% intersection with your other list element. It's not the full answer however. I suspect that you will need to change your connectWith parameter as well to be the panel itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM