jquery-ui-draggable

How to make a draggable across divs

自闭症网瘾萝莉.ら 提交于 2019-12-02 13:18:35
问题 How do I make elements draggable between two divs? This seems to be something that draggables should do. But I haven't been able with the code I have. In this jsfiddle I have two divs with draggable elements. I want to get one element to go from the first div to the second div. That functionality must exist on many web sites. Here is the jsfiddle with the code. http://jsfiddle.net/gkvgn/9/ I have asked before and thought that someone would know how to have that functionality. If the code I

How to drag textarea and inputs using jquery

柔情痞子 提交于 2019-12-02 10:35:43
I am using jQuery UI draggable to drag elements but it does not seem to work on textarea and inputs as they are focused whenever I click on them. Here is a JSbin Demo of the problem. HTML <textarea class="movable" placeholder="I am textarea. Try to move me"></textarea> <h2></h2> <div class="movable">I am a DIV. Try to move me</div> JS $('.movable').draggable(); I think I am missing some parameter in draggable method which can do this for me. Looks like I have found solution to this problem after some googling. Posting it here to help others. Two steps needed: jQuery Draggable disables

Different behaviors while using localhost and server name

ぃ、小莉子 提交于 2019-12-02 08:44:09
I wanted to drag an image around inside a div, which I did using the jQuery UI draggable function. HTML: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="jQuery/jquery-1.8.3.min.js" type="text/javascript"></script> <script src="jQuery/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script> <script> $(document).ready(function () { $('#dragme').draggable(); }); </script> </head> <body> <div id="container" style="width:300px;height:300px;overflow:hidden;margin:auto;border:solid 1px black"> <img src="http://img.thesun.co.uk/multimedia/archive/01650/greats

Offset issues with jQuery Draggable into an iFrame based Sortable

大城市里の小女人 提交于 2019-12-02 08:14:17
I'm having quite a bit of trouble resolving problems with offsets related to draggable elements being dropped into a sortable area within an iFrame. The following leaned-down example to demonstrates the problem here . Make sure to keep your window fairly narrow, as otherwise it's very difficult to drop the elements into the iFrame at all. It should be pretty obvious that you cannot drag the item and drop it in the designated place, instead you must drag about 350 pixels to the right of the leftmost border, after which the sortable will accept the draggable. I've tried quite a few things here

jQuery Draggable - Start dragging element by clicking on it, without holding the mouse

纵饮孤独 提交于 2019-12-02 08:12:22
Consider a basic jQuery Draggable element. Is there any method to start dragging the element with a single mouse click? (ie, when the element is clicked, it enters a drag state, and starts following the mouse, when it is clicked again, it gets dropped where it is) If this isn't achievable with jQuery, is it achievable with any other third party dragging library? You can do this, in a sort of hack method, by triggering the mousedown and mouseup for draggable on click event. Reference: How to programmatically invoke jQuery UI Draggable drag start? Referring the answer from fuzzyBSc Consider the

Elements became randomly non-resizable after dragging

谁都会走 提交于 2019-12-02 06:00:29
问题 After multiple elemens are selected and dragged, some of them are no more resizable: resize icon disappear from right corner. Resizable icon remains in old place and does not move which moved elements. To reproduce, run code below, select all elements using lasso and drag selected elements. After that resize icon disappers from random elements and those elements are no more draggable. How to fix this ? i tried to fix this by adding $(".designer-verticalline, .designer-rectangle, .designer

How to make a draggable across divs

筅森魡賤 提交于 2019-12-02 03:16:57
How do I make elements draggable between two divs? This seems to be something that draggables should do. But I haven't been able with the code I have. In this jsfiddle I have two divs with draggable elements. I want to get one element to go from the first div to the second div. That functionality must exist on many web sites. Here is the jsfiddle with the code. http://jsfiddle.net/gkvgn/9/ I have asked before and thought that someone would know how to have that functionality. If the code I have isn't the right way, how do I define an element and the draggable containment option to be able to

Elements became randomly non-resizable after dragging

倾然丶 夕夏残阳落幕 提交于 2019-12-02 00:37:42
After multiple elemens are selected and dragged, some of them are no more resizable: resize icon disappear from right corner. Resizable icon remains in old place and does not move which moved elements. To reproduce, run code below, select all elements using lasso and drag selected elements. After that resize icon disappers from random elements and those elements are no more draggable. How to fix this ? i tried to fix this by adding $(".designer-verticalline, .designer-rectangle, .designer-field, .designer-image").resizable(); to end of drag() methos but problem persists Reported also in https:

jQuery draggable - what happens if it is applied twice to an element?

做~自己de王妃 提交于 2019-12-01 21:33:04
Until recently I had this set up, which was called multiple times: $('.rsh') .draggable('destroy') .draggable({ blah blah details }); The destroy was there to stop multiple draggable handlers accumulating on the class. New elements are being created by AJAX, and an initial attachment of draggable to the class doesn't touch subsequently created elements. However, when I updated to version 1.9.2 of jQuery UI, it started giving me this error: Error: cannot call methods on draggable prior to initialization; attempted to call method 'destroy' So I removed the destroy line, and it's sweet. Except...

Connecting a Draggable to Sortable causes helper element to jump

此生再无相见时 提交于 2019-12-01 20:50:55
I have a jQueryUI draggable object and a sortable object on the page. Dragging an element from the draggable to the sortable causes the dragged element to jump up to the top left of the page . Here's the demo: http://jsfiddle.net/travisrussi/aBhDu/1/ To reproduce: Drag 'Item 5' from the draggable div (top box) to the sortable div (bottom box) Actual result: Item 5 jumps to top left corner when dragged over the sortable - http://i.stack.imgur.com/474OP.jpg It appears the dragged element switches from relative to absolute positioning . The dragged 'li' switches from: <li class="ui-state-default