How do I detect a file is being dragged rather than a draggable element on my page?

You can detect what is being dragged by inspecting dataTransfer.types. This behaviour is not (yet) consistent across browsers so you have to check for the existence of ‘Files’ (Chrome) and ‘application/x-moz-file’ (Firefox). // Show the dropzone when dragging files (not folders or page // elements). The dropzone is hidden after a timer to prevent // … Read more

jQuery’s drag and drop – reverse engineering Facebook’s uiTokenizer on ‘Arts & Interests’

It looks like you are just determining if the draggables right intersects the targets left, and if the draggables top intersects the targets bottom (with some tolerance). There are 2 ways I would go about this: Find all intersect elements and find the largest area – in this case the left square of the image … Read more

Bauerca drag-sort-listview simple example

Here’s a short program of how to use the library that I just managed to write myself. Basically it’s the same thing as the sample, just all in one place. package com.example.dndlist; import java.util.ArrayList; import java.util.Arrays; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.widget.ArrayAdapter; import com.mobeta.android.dslv.DragSortController; import com.mobeta.android.dslv.DragSortListView; public class MainActivity extends Activity { DragSortListView … Read more

How do I get the coordinate position after using jQuery drag and drop?

I just made something like that (If I understand you correctly). I use he function position() include in jQuery 1.3.2. Just did a copy paste and a quick tweak… But should give you the idea. // Make images draggable. $(“.item”).draggable({ // Find original position of dragged image. start: function(event, ui) { // Show start dragged … Read more

jQuery Drag And Drop Using Live Events

Wojtek’s solution worked perfectly for me. I wound up changing it a tad bit to make it extend jQuery… (function ($) { $.fn.liveDraggable = function (opts) { this.live(“mouseover”, function() { if (!$(this).data(“init”)) { $(this).data(“init”, true).draggable(opts); } }); return this; }; }(jQuery)); Now instead of calling it like: $(selector).draggable({opts}); …just use: $(selector).liveDraggable({opts})