jquery-ui-droppable

Droppable over event not firing on different tab

为君一笑 提交于 2020-02-06 06:16:23
问题 When I try to connect 2 lists which are seperated by tabs the over event is not firing on the list on the second tab. Here's my HTML <div id="TabSet" class="tabs"> <ul> <li class="tab"><a href="#tabs-1">Nunc tincidunt</a></li> <li class="tab"><a href="#tabs-2">Proin dolor</a></li> </ul> <div id="tabs-1"> <div style="padding: 10px;"> <ul class="list" id="list1"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> </ul> <ul class="list" id="list2"> <li class="ui

Droppable over event not firing on different tab

ぐ巨炮叔叔 提交于 2020-02-06 06:16:09
问题 When I try to connect 2 lists which are seperated by tabs the over event is not firing on the list on the second tab. Here's my HTML <div id="TabSet" class="tabs"> <ul> <li class="tab"><a href="#tabs-1">Nunc tincidunt</a></li> <li class="tab"><a href="#tabs-2">Proin dolor</a></li> </ul> <div id="tabs-1"> <div style="padding: 10px;"> <ul class="list" id="list1"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> </ul> <ul class="list" id="list2"> <li class="ui

JQuery UI set up my own tolerance

那年仲夏 提交于 2020-01-24 16:17:10
问题 I´m working on game for my little baby. I want to change default tolerance in droppable object. I know, that there are default values like touch, fit, intersect and pointer . But in my app it doesn't work correctly, because I want something between fit and intersect. When I use fit, it is too difficult to insert into correct position, and when I use intersect, it is too light. Here is my HTML source: <!DOCTYPE html> <html lang="sk"> <head> <title> Puzzle Slovakia </title> <script src="jquery

Jquery draggable: scrolling in droppable using helper 'clone' and appendTo

…衆ロ難τιáo~ 提交于 2020-01-24 10:24:20
问题 I'm suing jquery ui draggable on a list of items that can be dropped on a .droppable list of other items. Here's a jsFiddle to show what I'm trying to do: <div id="container"> <div id="left-pane" class="pane"> <div class="item">Item A</div> <div class="item">Item B</div> <div class="item">Item C</div> <div class="item">Item D</div> </div> <div id="right-pane" class="pane"> <div class="item">Item E</div> <div class="item">Item F</div> <div class="item">Item G</div> <div class="item">Item H<

jQuery droppable out event fails to trigger?

时光毁灭记忆、已成空白 提交于 2020-01-14 13:59:08
问题 $(".LWdrop").droppable({ accept: ".LW", drop: function(event, ui){ ui.draggable.addClass("LWactive"); $(this).droppable('option', 'accept',''); $(this).css("background-color", "#444444"); }, out: function(event, ui){ $(this).droppable('option', 'accept', '.LW'); ui.draggable.removeClass("LWactive"); }, activate: function(event, ui){ $(this).css("background-color", "blue"); }, deactivate: function(event, ui){ $(this).css("background-color", "#444444"); } }); Please ignore the ugly background

jQuery Sortable and Droppable

给你一囗甜甜゛ 提交于 2020-01-09 06:19:19
问题 I want to have a list that is sortable, but I also want the elements in that list to be droppable to the divs I have defined as droppable. I can't seem to find a way to do it. Any ideas? 回答1: Here's a simplified version of Colin's solution. The biggest difference is that this solution does not store the entire html of the sortable elements, but only the currently dragged item. It is then inserted into it's original position if the item is dropped on the droppable area. Anyway, here's the code

jQuery Sortable and Droppable

泪湿孤枕 提交于 2020-01-09 06:17:05
问题 I want to have a list that is sortable, but I also want the elements in that list to be droppable to the divs I have defined as droppable. I can't seem to find a way to do it. Any ideas? 回答1: Here's a simplified version of Colin's solution. The biggest difference is that this solution does not store the entire html of the sortable elements, but only the currently dragged item. It is then inserted into it's original position if the item is dropped on the droppable area. Anyway, here's the code

jQuery UI: sortable and draggable + sortable and droppable

喜欢而已 提交于 2020-01-05 08:02:46
问题 I have two lists. They are sortable but not connected (elements of list "one" cannot be mixed with elements of list "two") I want elements of list "one" be droppable and elements of list "two" be draggable, because I want to drag and drop element of list "two" into list "one". How should I do? EDIT: I tried to make the question as general as possible but maybe I should be more clear... sorry. Elements of list one are "categories" and they should be sortable. Elements of list two are "links"

jQuery UI: sortable and draggable + sortable and droppable

僤鯓⒐⒋嵵緔 提交于 2020-01-05 08:02:34
问题 I have two lists. They are sortable but not connected (elements of list "one" cannot be mixed with elements of list "two") I want elements of list "one" be droppable and elements of list "two" be draggable, because I want to drag and drop element of list "two" into list "one". How should I do? EDIT: I tried to make the question as general as possible but maybe I should be more clear... sorry. Elements of list one are "categories" and they should be sortable. Elements of list two are "links"

Reinitialize jQuery UI droppable after adding elements

江枫思渺然 提交于 2020-01-05 02:50:19
问题 I have some elements that on page load are droppable. At some points I add some more of these elements (same selector) and I want the new elements to be droppable as well. Is the only option to call the original droppable function with all the options? You see, The droppable function call is pretty big, and I don't really want to duplicate code this way. Is there a more elegant way? this is the code for clarification: $('td:not(.td-disabled)').droppable({ hoverClass: "ui-state-active", drop: