drag-and-drop

jQuery Sortable without jQuery UI

自古美人都是妖i 提交于 2019-12-20 09:53:32
问题 I am in need of "Sortable Drag & Drop" functionality and I'm using jQuery. I can't really use jQuery UI, because for this project it would be an overhead (I'd need to add many KB of JS and CSS only to use small part of functionality). Is there any plugin that you could recommend or maybe a simple implementation path, that I can follow? The solution must be as lightweight as possible, preferably based on jQuery/Sizzle or pure JavaScript. 回答1: You can build your own JQuery download on jqueryui

jQuery HTML5 file drag and drop

坚强是说给别人听的谎言 提交于 2019-12-20 09:20:34
问题 I have looked at many scripts for uploading images to the server with AJAX with drag and drop. The scripts I found are not jQuery, are quite large and don't do exactly what I want. In the future it should upload an image with jQuery, AJAX and PHP. My question In many of the example I've looked at e.dataTransfer.files work. In my case it don't. Do I need to bind it somehow? I want jQuery as much as possible. JsFiddle Play around as much as you like... http://jsfiddle.net/AMjEz/ Code <html>

Why doesn't HTML5 drag and drop work in Firefox?

耗尽温柔 提交于 2019-12-20 09:09:39
问题 I have bound events to different elements, and when I drag them in all browsers, except Firefox, it works as expected. In firefox, however, it doesn't work at all. The only event that fires is dragstart , and none of the other events fire. What's going on? 回答1: I'm not using jQuery, so removed the originalEvent portion and changed the format to text (or IE had issue), and it works: event.dataTransfer.setData('text', 'anything'); In the drop event make sure to call: event.preventDefault(); Or

HTML5 Drag and Drop API on Touch Screen Devices

微笑、不失礼 提交于 2019-12-20 08:57:05
问题 I was just wondering if the HTML5 API for Drag and Drop included support for touch screen displays. I was thinking of iPhone, but I know this isn't supported yet. I was wondering if that is just catching up on the part of Apple, to support HTML5 drag and drop on Safari mobile, but I also was thinking maybe the HTML5 API wasn't powerful enough for this, but I highly doubt that. How about on a standard touch screen laptop tablet or the like, I don't have one so I can't test but I would imagine

Dragging Controls on Form at runtime

房东的猫 提交于 2019-12-20 06:46:35
问题 I've just started using WPF. But I'm trying to add my code that (from Winforms) enables the user to drag any control whereever they wish at runtime. But I can't seem to get the current Location of the mouse... Eh? There is no Location for Mouse? :( 回答1: In the Mouse event you can use e.GetPosition to get the current mouse position. This function can provide the mouse position relative to a specific element or you can just pass null. Here is a very simple example, no hit testing or anything,

Why this Selenium's drag and drop C# code is not working on Chrome?

老子叫甜甜 提交于 2019-12-20 06:33:26
问题 This doesn't work (e.g.: https://www.w3schools.com/html/html5_draganddrop.asp) var item = WebDriver.FindElement(By.XPath(@"//img[@src='img_w3slogo.gif']"), 30); var container = WebDriver.FindElement(By.XPath(@"//div[@id='div2']"), 30); var actions = new OpenQA.Selenium.Interactions.Actions(this.WebDriver); actions.DragAndDrop(item, container).Build().Perform(); System.Threading.Thread.Sleep(3000); 回答1: If it helps.... public static void DragAndDrop(IWebElement element1, IWebElement element2)

How to create a drag/drop with ActionScript 3.0? Multiple items being dragged to multiple targets

♀尐吖头ヾ 提交于 2019-12-20 06:09:33
问题 I am creating an interactive paper doll in Adobe Animate and am having some trouble making the drag drop feature work. I have multiple clothing items that will need to have the possibility of being dragged to the same area. For example I may have 4 different shirt options. I have started with the two dresses (yellow dress_mc & blue dress_mc). The yellow dress is working properly, but the blue dress won't work, I can drag it, but not drop it. Any suggestions? This is the code I have right now:

JQuery Draggable + Sortable: How to tell if item was actually added to my sortable list?

狂风中的少年 提交于 2019-12-20 05:36:06
问题 OK, I'm probably missing something obvious here, but my searches aren't turning up anything helpful. I've set up a sortable list and connected a draggable "palette list" to it, as explained here: http://jqueryui.com/demos/draggable/#sortable I can drag items from my draggable list and drop them on my sortable list. That works fine. I need to fire a function only when one of these items is dropped onto the sortable. I've tried the "stop" hook on the draggable item, but that fires regardless of

drag and drop in windows phone

亡梦爱人 提交于 2019-12-20 05:21:39
问题 i am trying to implement drag and drop feature to arrange the content of my listbox. I was able to drag the item. when i try to drag the second item to first item, it appears over the first item but when i try to drag the first item to second item, then first item goes under the second item. also i am unable to catch the drop, so that i can arrange the items. Can anybody help me on this? here is the sample of code i am using <ListBox Name="lstBoxImages" ScrollViewer

PyQt4 - Dragging and dropping files into QPushButton

泪湿孤枕 提交于 2019-12-20 03:55:21
问题 I think the title is fairly self explanatory. I'm working to create a small standalone app that requires the user to drag and drop audio files onto buttons to in turn associate the file with a corresponding button on a piece of hardware by using the filepath, etc... I've followed a ton of drag and drop tutorials for widgets, and my friend has for lists, however I'm beginning to believe that it can't be done for a button? I'm aware that you can drag and drop text onto a button. I am not fully