jquery-ui-draggable

jQuery UI issue, droppable and overflow scroll

喜夏-厌秋 提交于 2019-12-12 06:57:08
问题 I used the search and have not found an answer to my problem even if I've seen the same problem on other issues. I need that ".draggable" scroll '#div1' when you introduce the element. I put the jsFiddle: http://jsfiddle.net/carlosnufe/7Rxst/ jQuery: $('.draggable').draggable({ appendto : "#div1", helper : "clone" }) $('#div1').droppable({ scroll: true, }); HTML: <div id="div1"> <div class="demo"></div> <div class="demo"></div> <div class="demo"></div> <div class="demo"></div> <div class=

Scrolling a sortable/dragable item's parent container when its border is reached

被刻印的时光 ゝ 提交于 2019-12-12 05:26:26
问题 I have a huge list of items that can be sorted by dragging them. I noticed that once the list gets very long and overflows its parent container's height, dragging an item to a position not currently visible gets very inconvenient. Here is an example (jsFiddle). I want to drag the first element to right before the last element in one gesture. Currently that's not possible because I can't drag and scroll at the same time. Is there a setting that enables auto-scrolling the container as soon as I

Fix position mouse cursor

风格不统一 提交于 2019-12-12 03:27:15
问题 When I drag the svg(red) to another position on the screen, the cursor mouse loses the original angular position (lag) and points to blank area ... I used a var dx and dy in "var point e.clientx" to fix it, unsuccessfully ... any suggestions? code: http://jsfiddle.net/rebecavascon/evgLhdz3/2/ show: http://jsfiddle.net/rebecavascon/evgLhdz3/2/show/ function updateSVG(e) { if (follow) { var centerPoint = new Point(center[0].getAttribute("cx"), center[0].getAttribute("cy")); var point = new

Creating jquery draggable “stop” callbacks in a for loop

跟風遠走 提交于 2019-12-12 02:33:28
问题 I have a for loop iterating through a variable number of draggable elements, creating a stop-event callback for each. The callback function needs to know the index of the item that it is linked to. I've encountered what I think is a closure problem: when the callbacks are fired off, the state of the loop iterator index variable that gets passed to the callback (_x) is the last value of the loop iterator index, rather than the value of that iterator index at the time the callback function was

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 draggable outside div but not within it

笑着哭i 提交于 2019-12-11 14:18:58
问题 Justin Bull's answer gets me part of the way. But I have an additional requirement which is not satisfied by Justin's answer. Here is the setup: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.4.0"); google.load("jqueryui", "1.7.2"); google

How can I drag jqgrid edit form properly?

◇◆丶佛笑我妖孽 提交于 2019-12-11 12:02:19
问题 When I drag a edit form, the position of the form is not valid. Always it starts from position (0,0) to the window. Its position is not relative to mouse cursor position. How can I fix this? These are my code. <table id="jqGrid"></table> <div id="jqGridPager"></div> $("#jqGrid").jqGrid({ url: url, mtype: "GET", postData: data, datatype: "jsonp", colModel: [ { label: 'd_id', name: 'd_id', width: 15, key: true, hidden: true}, { label: 'driver', name: 'd_name', width: 30, align:"center",

Draggable object “glued” to border

雨燕双飞 提交于 2019-12-11 10:44:07
问题 I've created a user control that includes a label inside a draggable div, like this: <style type="text/css"> .text_label { margin-top:8px; font-size:18px; color:#545454; -moz-border-radius: 2px; -webkit-border-radius: 2px; -border-radius: 2px; } .clear { clear:both; height:20px; } .drag { display:block; } </style> <div class="drag"> <asp:Label ID="lbl1" class="text_label" runat="server" Text="Click Me"/> </div> <div class="clear"></div> For draggable I'm using the following option in the

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

Drag element from inside one div into another

北城余情 提交于 2019-12-11 09:21:18
问题 I want to have the capability of dragging an element from inside one div into another. jQuery UI draggable and droppable, but they seem to only manipulate the elements visually, using position:relative without moving them through the DOM. If they can, I can't seem to find an example or figure out how. Say if I have two simple div s such as: <div id="firstDiv"> <div id="moveMe">I need to be moved to secondDiv</div> </div> <div id="secondDiv"> </div> how can #moveMe be dragged and dropped from