jquery-ui-sortable

jQuery drag and drop - Allow only one item in list

ぃ、小莉子 提交于 2019-12-22 11:02:19
问题 I work with this example from jQuery UI Sortable I have a problem with drag and drop. Table number 3 - sortable3 should only be able to receive one item. This is my HTML <div class="demo"> <ul id="sortable1" class='droptrue'> <li class="ui-state-default">Can be dropped..</li> <li class="ui-state-default">..on an empty list</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default">Item 4</li> <li class="ui-state-default">Item 5</li> </ul> <ul id="sortable2" class='dropfalse'>

sort multiple items at once with jquery.ui.sortable

筅森魡賤 提交于 2019-12-22 07:01:40
问题 did somebody manage to sort multiple items at once with jquery.ui.sortable? we are working on a photo managing app. select multiple items drag them to a new location. thanx 回答1: I had a similar requirement, but the solution in the accepted answer has a bug. It says something like "insertBefore of null", because it removes the nodes. And also i tried jQuery multisortable, it stacks the selected items on top of each other when dragging, which is not what i want. So I rolled out my own

Get the item/object where the element is dropped

99封情书 提交于 2019-12-22 04:58:11
问题 I'm coding a task panel with three lists and I use sortable to move item between them. But I need to pick up the item where the element is dropped. I know that ui.item is the element dropped, but I don't know where I dropped it. Here is my code: $( ".column" ).sortable({ receive: function(event, ui) { /* get the element where ui.item is dropped */ } }); I know that the element will be any with the .column selector, but how to pick!!! 回答1: Very Simple: alert($(this).attr('id')); //this is

Sortable items and subitems in list on jQuery ui sortable

狂风中的少年 提交于 2019-12-22 04:35:16
问题 If you drag any child element beyond any parent, its position is stored . This is a helluva lot . Element must go back to the previous parent. Child elements must be able to move within the parent and the parents . Parent elements must be able to move between them. problems: How to disable drag child elements abroad parents? How to enable parents to drag right? Now , if the example of the first parent to drag down to the place PARENT # 2 or PARENT # 3 , it will not move Code: <script type=

jQuery iframeFix on a Sortable

怎甘沉沦 提交于 2019-12-22 00:25:57
问题 On my CMS I have a list of thumbnails (Sortable). The thumbnails work great and now I'm writing a plug-in to drag-them to a tinyMCE window. As the tinyMCE window has an iFrame it doesn't work that well. jQuery has an option for Draggables called iframeFix that works exactly as I need. However that list must be a Sortables. I've looked quite extensively on Google and found no-one with my requirements. Has anyone here on StackOverflow done it? Apply the iframeFix to a Sortables? If not... I'm

jQuery reinitialize/refresh draggable/sortable elements dynamically

眉间皱痕 提交于 2019-12-21 21:28:03
问题 I have a few functions which I load in the ready() event. These basically make a list draggable, and other areas droppable/sortable. Eg. You can drag a clone into multiple areas (lists in divs), and within these multiple areas, you can sort/reorder them (but only within each area). This works perfectly. I have a button which dynamically creates a new area for items to be dropped into, then sorted. It creates the new area perfectly, but you cannot drop items into it, or then even make them

How to manually trigger 'update' in ui-sortable

落爺英雄遲暮 提交于 2019-12-21 20:28:24
问题 I'm using an UI sortable with in each item a delete button. Here is the delete function: $('.delete_item').click(function(){ $(this).closest('.grid_3_b').remove(); initSortable(); $(".sortable").sortable('refresh').trigger('update'); }); The div get's removed as I want to, but there is no update data sent to PHP.. So my script won't save the order and deleted item.. Here is my initSortable(); function: function initSortable() { $( ".sortable" ).sortable({ items: '.grid_3_b, .dropable',

jQueryUI draggable + sortable bug (Cannot read property 'options' of undefined)

别等时光非礼了梦想. 提交于 2019-12-21 09:02:07
问题 My question seems to resemble this question: dragging from a sortable list to a drag and drop plugin But since there is no answer given to that one i was wondering if anybody could / would be able to figure it out with me. The issue i am having is that i create a draggable div and append this into a div that is made sortable. When i specify any arguments like so: $(el).sortable({ ... arguments ... }); It causes an error when element is dropped see below, when left empty it strangely works

How to handle Drag and drop from ListBox in SAPUI5?

亡梦爱人 提交于 2019-12-21 06:38:13
问题 I could find that drag and drop are supported in SAPUI5. But I am not able to implement the same in my app. I tried to bind to the dragstart and dragleave events, they are not working. I even tried to example provided in the other threads(http://jsbin.com/qova/2/edit?html,output). This example is also not working. I can select the list item, but when I try to drag, the selection just extends and nothing happens. Please let me know if I am doing anything wrong. Here is the HTML Snapshot Source

How to test a JQuery UI Sortable widget using Selenium?

纵然是瞬间 提交于 2019-12-21 05:18:36
问题 We have a sortable list using JQuery UI Sortable that we are trying to automate using Selenium. It looks like the dragAndDrop function should work, but when we call it, the UI does not change. However if we look at the DOM with firebug, we see that the order of the list elements DID change. It seems it's just the UI that does not refresh. Any idea how to get it working? 回答1: Try dragAndDropToObject. I was just able to move things around using Se-IDE (though I suspect Se-RC would work as well)