jquery-ui-draggable

jQuery UI image carousel with draggable images

こ雲淡風輕ζ 提交于 2019-12-24 10:53:22
问题 I need to create a jQuery image carousel with about 30 images (displaying 5 at a time) that will also allow the user to move each image (presumably implemented as a draggable) and drop that image into a droppable div. I've experimented with jCarousel and I don't think it will work for my situation. Anyone know of something? 回答1: You would have to import jquery, jqueryui, jcarousel and any applicable css associated with jcarousel and jquery ui. Currently I'm having a problem deleting the

How to move Draggable objects between source area and target area with jQuery

僤鯓⒐⒋嵵緔 提交于 2019-12-24 07:14:08
问题 How to move draggable objects between source area and target area?? For example: (Picture 1) Original location (Picture 2) and then move some items (Picture 3) my question is how to move the item between source area and target area PS: I've tried a lot of possibilities like as below addresses Revert a jQuery draggable object back to its original container on out event of droppable http://devilmaycode.altervista.org/revert-a-jquery-draggable-object-back-to-its-original-container-on-out-event

Ember.js routing and jQuery UI Draggable mixin messing with each-other

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 07:09:29
问题 I have been banging my head against this for 2 days solid now and I need some advice on how to track down the root of this problem. Hopefully someone (you, reading this perhaps?) has had a problem similar enough that you can offer some help. My app has a few things draggable via the jQuery UI widget with that name. This works really well until I navigate inside the app using Ember's routing. Something happens when the UI is refreshed and the things in and around the draggable items are re

Draggable element in VML get stuck when size change (height, width) in IE 8

馋奶兔 提交于 2019-12-24 02:56:14
问题 I'm having issue with VML (wich I use as fallback for svg) I use jQuery UI draggable to let user be able to move an element around. The problem occurs when I resize the image (wich is a v:image) by changing the style attribute of height and width. What happen at this point is that the element get stuck at the left top corner of it's container and cannot be dragged anymore. A strange thing is that when I ask for the position (top, left) of the draggable element in the javascript console, I get

Triggering a drop event with jQuery droppables

荒凉一梦 提交于 2019-12-23 11:44:13
问题 Variations of this question have been asked, but the answers are all different, somewhat dated, and aren't working for me so I'm hoping it's a matter of changed syntax rules in jQuery that I'm missing. The scenario HTML: <div id="theDroppable">Droppable</div> <div id="theDraggable">Draggable</div> <div id="theTrigger">Click to trigger a drop</div> The jQuery: $( "#theDroppable" ) .droppable({ drop: function( event, ui ) { alert('dropped'); } }); $( "#theDraggable" ).draggable({}); $( "

Set position of draggable div

£可爱£侵袭症+ 提交于 2019-12-23 07:04:24
问题 I'm doing a little application using jQuery and JQuery ui. I've defined a dragable div, and it works perfectly, but I want to set the position of the div when a click a button... I read here in stackOverflow to do this: element.position().top = topUserDefined; element.position().left = leftUserDefined; I did an alert of element.position().top before and after this assignment and the new value it's not assigned, it keeps the original one... Any Idea??? Thanks! 回答1: .position() gets the

Set position of draggable div

不问归期 提交于 2019-12-23 07:04:04
问题 I'm doing a little application using jQuery and JQuery ui. I've defined a dragable div, and it works perfectly, but I want to set the position of the div when a click a button... I read here in stackOverflow to do this: element.position().top = topUserDefined; element.position().left = leftUserDefined; I did an alert of element.position().top before and after this assignment and the new value it's not assigned, it keeps the original one... Any Idea??? Thanks! 回答1: .position() gets the

Creating a draggable object in a iFrame from outside

人走茶凉 提交于 2019-12-23 04:38:30
问题 My problem : I need to create draggable widgets (here it's a jslider for example) from outside the iframe. Both Container and iframe content are from the same origin. The problem is that jQuery is attaching the mousemove event on the wrong document object. http://jsfiddle.net/techunter/4pnxh Try moving the sliders, it can only move when the mouse trigger the events outside the iframe. Please help, I'm stuck here EDIT: JQuery listens to the click on the slider handle and on click event it

How to bind JQuery draggable to a hover event

血红的双手。 提交于 2019-12-23 03:05:15
问题 I'm having a tough time in finding a solution for following effect. Imagine having a container " #container " containing: An element " #element " that should only be draggable horizontally and within it's parent (" #container ") A handle " #handler " which should be the dragging handle . Now the whole thing shold be dragged on hover . Up to now I have following code, but don't know what to do: <script> $("#element").dragable({handle: "#handler", axis: "x", containment: "#container"}); <

Disable drop if div has already been dropped?

有些话、适合烂在心里 提交于 2019-12-23 02:34:55
问题 I've created a drag and drop game in order to start teaching myself jquery. Everything seems to be working but you can drop more than one item onto the same square. I want to disable droppable if the place holder has an image in it. I've looked into: `greedy: true` That disables the drop but I'm not sure how to enable it again and also: $(this).droppable( 'disable' ); I can get these both to disable the drop but not sure how I get them to enable it again if the block/image reverts back to its