jquery-ui-draggable

JqueryUI Draggable not working in IE?

≯℡__Kan透↙ 提交于 2019-12-11 06:55:54
问题 I'm using JQueryUI to help with the moveable items on this page: http://www.hiredavewaring.com If you scroll down, you'll see the png's that you can grab and move over my face to create a Mr. PotatoHead type effect. I know it's not the prettiest code in the world, but it is working great on every browser, except Internet Explorer. Does anyone know a fix to help these items become draggable in IE? Here's the code without the Google Analytics or Meta: <link rel="stylesheet" type="text/css" href

Check if droppable already contains another draggable element (jQuery UI)

这一生的挚爱 提交于 2019-12-11 04:06:09
问题 I have a droppable div element that fades out when a draggable element is dragged off it. This works fine using the out event. The problem I'm getting is when there are two draggable elements on the droppable. The droppable element will still fade when I drag one off. How can I check if there is already another draggable element on the droppable so I can cancel the fade effect. I want the droppable element to fade only when the last draggable element is taken off. $(".droppable-element")

Add jquery ui function draggable/resizeable after appending/adding it on the page

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:47:33
问题 I have problem on my webpage, I am adding an element in the document when the user clicks on a specific button. the element is <div class="draggableResizable"> Some text </div> script.js $('#button').click(function() { $("#pageWrap").append(element) }) $('.draggableResizable').draggable().resizable() Any suggestions are welcome. Thank you. 回答1: Just restructure so you initialize the widgets after adding the element: $('#button').click(function() { //create an element var $element = $('<div

jquery remove from droppable when dragged out

可紊 提交于 2019-12-11 03:38:48
问题 I have implemented jQuery's draggable and droppable based on the example shopping cart demo. I would like to be able to remove the <li> from the droppable when you drag it out of the droppable. I thought this might have something to do with the droppable out event but the ui parameter is empty. Does anyone know the solution? 回答1: This is a complete working solution, not completly tested, you should still debug it maybe: {reassign draggable to dropped element to fired drop out event} {you

jQuery UI draggable: get the underlaying element at drag-stop

点点圈 提交于 2019-12-11 02:57:33
问题 Is it possible to get the underlaying element of an dragged element? My specific task is to drag a td element. If the dragstop event is fired I want the underlaying element. The underlaying element is also a td . How could I achiev this? Here is my HTML code: <table class="grid"> <tr> <td class="value" colspan="4"></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </table> The jQuery part is here: $('.value').draggable({ cursor: "move", containment: ".grid",

Jquery-ui draggable: how to make a draggable element scroll a div when hovering over it

时间秒杀一切 提交于 2019-12-11 02:56:39
问题 I've got a bunch of draggable elements, and the droppable elements that receive them are in a div that is set to overflow-y: scroll. The 'scroll' option of draggable works to scroll the whole page, but I cannot get it to scroll the parent div of the droppables. I've tried changing the containment attribute of the draggable to be the droppables' parent on hover, but that doesn't work either. If anyone knows of a way to do this, I'd greatly appreciate it. Here's the basic idea of what I'm

JQuery-UI horizontal dragging with vertical scrolling

有些话、适合烂在心里 提交于 2019-12-11 02:48:57
问题 I have a page full of draggable divs only in horizontal (on axis X). When I'm in a touch device I can't scroll down the page, due conflicts between scroll and drag. Here's a jsfiddle example (test in touch devices and try to scroll). My draggable code: $(".cell").draggable({ axis: "x", drag: function (event, ui) { var size = $(".cell").width(); if (ui.offset.left > size - em(4)) { ui.position.left = size - em(4); } }, start: function (event, ui) { if (initialPosition == null) {

How can I clear the styles on a .draggable element's children, before moving them to the target?

冷暖自知 提交于 2019-12-11 00:26:24
问题 I have a div in which I do some manipulation of list-items using the excellent fcbkcomplete jquery plugin. However, when i plug this in with my draggable and sortable page, I realized that the extra decorations are frozen when I move it over. This makes the end result feel unpolished, to say the least. I know I can intercept the mousedown event before the drag, but I don't know what elements to modify to keep the style simple. Here is a demo of fcbkcomplete, it resembles facebook's message

Implementing Auto Scroll with JQuery UI Draggable Widget

陌路散爱 提交于 2019-12-11 00:13:22
问题 I'm working with the jQuery UI Draggable widget. It's working well except I now need to add auto scroll. That is, while dragging, I want to scroll the browser window when the mouse is at the top or the bottom of the window. I have a lot of experience doing things like this in C and C++. I would set a flag to indicate that a drag operation is underway. In the mouse move message handler, I would set a timer. And in the handler for the timer, I would scroll the window in the appropriate

Droppable items not displaying hoverClass if they are shown during drag operation

蹲街弑〆低调 提交于 2019-12-10 18:53:55
问题 I know the title is confusing, but the problem is easily reproduced. I have some elements on my page that are droppable (jQueryUI), and the hoverClass shows when they are being dragged over. However, I have some hidden elements that are sometimes shown during the drag, and then do not respond with their hoverClass as they should. I have a jsFiddle here that shows this happening, however, if you continue to drag the div around eventually the listItems start to show their hoverClass. However,