jquery-ui-sortable

How to pass sortable order to hidden field in jQuery?

人盡茶涼 提交于 2019-12-11 23:45:26
问题 I'm trying to pass the values of a sortable list to a hidden field using the code below, but no luck: <script> $(document).ready(function(){ $(function() { $( "#sortable1, #sortable2" ).sortable({ connectWith: ".connectedSortable" }).disableSelection(); }); var idsInOrder = []; $("#form_quest").submit(function(){ $("ul#sortable2 li.card").each(function() { idsInOrder.push($(this).attr('title')); }); $("#sort_order").val(idsInOrder); }); }); </script> html hidden field: <input type="hidden"

Jquery drag and drop with Table Cells and getting their position to save

戏子无情 提交于 2019-12-11 18:27:27
问题 here i have the following html, as it is basically match the following concept, i need to able drag and drop the AnswerSide Cells. Only Answers Side cells can me moved up and down. and after moving, we need to get the Text of the answer and its position. (as i am doing in asp.net, and the table will be genrated behind the code.) User can move up and down the Answers. ( only Answers can be moved ) We need to retrive the text, and its position We need to save it in DB can any one tell me how to

jQuery UI sorting some elements of nested list

对着背影说爱祢 提交于 2019-12-11 17:07:31
问题 In the following jsFiddle, there consists of a phase, week, day. The idea is that: 1) Phase can be moved above or below other phases 2) Weeks can only be moved between phases (if there are nested days, they'll move with the parent week) 3) Days can be moved into other weeks As I have it right now, you can move a Week but the Days beneath it do not follow and can become orphaned (bad). The other issue I'm running into is if you move a Day 1 into another week that also has a Day 1, something

jquery sortable and droppable - cannot append the drop item?

谁说胖子不能爱 提交于 2019-12-11 15:27:59
问题 I want to append the dropped item into the targeted droppable box from the sortable list, but I cannot append the dropped item into the specific element. My jquery, $(".sortable").sortable({ update: function(){ // php update. } }).disableSelection(); $( ".droppable" ).droppable({ activeClass: "ui-state-hover", hoverClass: "ui-state-active", drop: function( event, ui ) { var targetElem = $(this).attr("id"); $( this ) .addClass( "ui-state-highlight" ) .find( "p" ) .html( "Dropped! inside " +

jQuery Ui sortable can`t drag li elements in cloned ul

时光总嘲笑我的痴心妄想 提交于 2019-12-11 14:28:57
问题 i have a problem with a jQuery sortable list. I got two ul-lists. These two lists are sortable (the complete ul-sets) and the li children are sortable also. So you can sort the complete list position and you can sort the li-positions and drag li-elements from one list to another. Using a button next to each list, i can clone a complete ul-list. Therefore i use the clone(true,true) function. I use true parameters, because i got events on the buttons and i want them to be applied to the clones.

JQuery Sortable overlapping issue

风格不统一 提交于 2019-12-11 12:51:45
问题 I have two sortable lists in two div's, each div has the overflow-y:scroll property. When I drag an item from the left div to the right div, it slides under the right edge of the left div, disappearing from view, yet everything functions as if it where there (so it can still be added to the right list etc.). I have experimented and it seems to be an issue with setting the CSS overflow attribute on the parent div. Does anyone know a workaround for this? 回答1: This seems to be a bug with the

jQuery UI sortable: How to exclude items from connected lists?

帅比萌擦擦* 提交于 2019-12-11 12:13:59
问题 I have two lists (left/right coloumn) which are connected, so I can drag&drop items from one column (left) to the other (right). How can I exclude specific items from list1 (left) that should NOT be draggable to list2 (right) while keeping the functionality to drag&drop them inside their source-list ? Fiddle: http://goo.gl/7ZKfrl 回答1: I used the following and it worked for me. Had same requirement. $("ul#YourLeftListID li").each(function () { if ($(this).text() == 'None') { $(this).draggable(

jQuery UI Sortable + Dragable - Prevent items from “source” list from being dropped twice on “target” list

喜欢而已 提交于 2019-12-11 09:34:21
问题 I am using a combination of sortable and dragable on a "widget-style" set of lists. I have my "available" list of items in a draggable list that is connected to 7 "target" lists (which are sortable). The available list has the clone helper to make sure the available list always stays populated with the available items. This all works beautifully, with one exception. Once an item has been dragged and dropped from the available column to a target column, I do not want it to be draggable onto

Best solution for drag/drop category/subcategory? Tried jQuery UI sortable, now stuck

本小妞迷上赌 提交于 2019-12-11 08:33:38
问题 I have a very crude category list right now, but I'm wanting it to make it look and behave more like WordPress admin does it, where you can drag a category into another category. Code looks like this: <ul class="categories"> <li>Real Estate</li> <li>Home Improvements</li> <ul class="categories"> <li>Interior</li> <li>Exterior</li> <ul class="categories"> <li>Exterior Subcat</li> </ul> </ul> </ul> I tried jQuery UI's sortable, and told it to sort <li> 's only, but the list items wouldn't drag

able to save JQuery Sortable (new order) to ASP.Net MVC controller?

廉价感情. 提交于 2019-12-11 07:36:31
问题 I have already implemented JQuery sortable, and it works fine. The problem is I can't pass the list in its new order to a controller so i can save it. If the original list looks like this 1 - Cookies 2 - chocalate 3 - biscuits 4 - sweets And the user drags and resorts to be 1 - chocolate 2 - biscuits 3 - sweets 4 - cookies How can i pass the new order to my controller in order to re-order the data in my model. $('td, a', '#MenuItem').each(function () { var cell = $(this); cell.width(cell