20 jQuery Drag and Drop Plugins. Jquery перетаскивание элементов мышкой


20 jQuery Drag and Drop Plugins

During the past few years, JQuery has been able to replace the use of Flash thereby enabling sites to perform better and faster – without having to forego many of the features and functions which Flash presented users in the past.

JQuery continues to propel forward on nearly a daily basis- with developers continually creating and adding new functions for site users and designers alike to achieve nearly the ( once thought of ) impossible by which to enhance a websites functionality and elements. With JQuery Drag & Drop designers and users alike are now able to add draggable functionality to any DOM element. Drag & Drop JQuery can now allow you to move any particular draggable object with the click of a mouse and drag it anywhere within the page.

In this article, we would like to present our readers with some of the best Drag & Drop JQuery Plugins by which to enhance their upcoming projects or add that extra functionality to their web pages. Let us know whether you have used any of these Drag & Drop Plugins within your projects / sites and which you prefer and why in the comment section below. Enjoy !!

1. jQuery File Uploader

jQuery File Uploader is a jQuery plugin to drag and drop files, including ajax upload and progress bar. The idea for this plugin is to keep it very simple; unlike other options/plugins that mess up a lot with the markup and provide some really ‘hacky’ ways to make it available for prehistoric browsers.

2. Shapeshift

Shapeshift is a plugin which will dynamically arrange a collection of elements into a grid in their parent container. Shapeshift is intended to be a very bare bones version of these grid systems, however the drag and drop is what sets it apart from the other similar plugins. Position any item within the grid by dragging and dropping them into place. Shapeshift will try to find a logical place for it and display that to you.

3. Lazy Line Painter

Lazy Line Painter is a pretty original jQuery plugin for preparing and presenting SVG path animations using jQuery. It works for any SVG file (any design can be exported with Illustrator in seconds) and simply by drag ‘n’ dropping it to an online generator provided by the plugin. Various options exist for customization including the stroke width, color, speed and a callback that is triggered once the animation is completed. The plugin requires Raphaël besides jQuery and can be a nice way of presenting illustrations for graphic designers.

4. Gridster

Gridster is an impressive jQuery plugin to develop iGoogle-like multi-column grids that can be drag ‘n’ dropped and re-ordered. The plugin only requires jQuery (no jQuery UI) and can convert any given HTML structure into the widgets of the grid. And, we are not limited with the elements loaded initially but can add and remove new ones dynamically.

5. HTML5 Sortaable

This plugin uses the native HTML5 drag and drop API for creating sortable lists/grids and provides a similar API + behavior when compared to jQuery UI’s sortable. It is lightweight (less than 1kb when minified/gzipped), supports “connected lists(moving items between different lists)” and works in all major browsers.

6. Percentage Loader

Percentage Loader is a jQuery plugin which makes use of HTML5 canvas(no images) for creating a very good looking loader. The loader is only 10kb (minified), can also be used as a drag ‘n’ drop supported controller (like a circular volume button) and multiple instances of it can be displayed in the same page.

7. jQuery Knob

jQuery Knob is a lightweight jQuery plugin for creating good-looking circular switches (like the “volume controls” in radios). It works by transforming any given input fields according to the values defined in its attributes and can be drag ‘n’ dropped to change the value. We can define the min-max values, default value on initial load, color and put it into “read-only” mode (which is also good for using it as a visualization component).

8. jQuery File Upload

jQuery File Upload is an impressive plugin for creating a flexible and user-friendly upload functionality with ease. The plugin support multiple file selection and drag ‘n’ drops. It can display a preview of images to be uploaded and progress bars exist to inform users. jQuery File Upload can handle cross-domain, chunked and resumable file uploads. File types and max-min sizes can be restricted with simple functions and it can work with any server-side language.

9. jOrgChart

jOrgChart is a jQuery plugin which converts nested unordered lists into tree menus but with an organization chart-like output. It has support for any depth, clicking each item can show/hide the sub-levels and drag ‘n’ dropping elements from one node to another is possible, the interface will adjust the levels accordingly.

10. FieldChooser

fieldChooser is a jQuery plugin for selecting from a list of fields or values (the source) and adding them to a new list (the destination).You move fields from the source to the destination by dragging and dropping with multi-select. Fields themselves can be simple HTML elements or more complex containers.

11. Droparea

Droparea is a HTML5 drag and drop image file uploader jQuery plug-in and a php script for server-side. Simply drag the image file into the specified area, the image will be automatically uploaded to your server. You can also see the progress of the upload too. It has been tested on Google Chrome and Mozilla Firefox.

12. jQuery Gridly

Gridly is a jQuery plugin to enable dragging and dropping as well as resizing on a grids.

13. jQuery. Kinetic

jQuery.kinetic is a simple plugin which adds smooth drag scrolling with gradual deceleration to containers.

14. Cyclotron

Cyclotron is a simple jQuery plugin for dragging 360° panoramas (cylindrical projection) and other seamlessly looping images around.

15. Pep

Pep was built out of a need for kinetic drag support for both mobile and desktop devices (click & drag). It uses the best of jQuery’s animate functions along with CSS3 animations to bring full-blown kinetic drag that works on all HTML5-ready devices. Pep has built-in support for custom start, stop, rest, and drag events, constraining objects to either their parent or the window, a debugger, and the ability to customize your own kinetic easing functions.

16. Full Calendar

FullCalendar is a jQuery plugin that provides a full-sized, drag & drop calendar like the one below. It uses AJAX to fetch events on-the-fly for each month and is easily configured to use your own feed format (an extension is provided for Google Calendar). It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event) .

17. JS Plumb

jsPlumb is a jQuery plugin for visually connecting HTML elements on a web page. It uses a HTML5 canvas element when supported and Google’s ExplorerCanvas script to support older browsers. The styles, shapes of the wires and “the position of the connection” can be customized easily. jsPlumb also supports drag’n drops (requires jQuery UI for this functionality).

18. Gridlist

GridList is a drag and drop library for a two-dimensional resizable and responsive list of items. An agnostic GridList class that manages the two-dimensional positions from a list of items within a virtual matrix. A jQuery plugin built on top of the GridList class that translates the generic items positions into responsive DOM elements with drag and drop capabilities.

19. jQuery Ajax File Uploader

Query plugin to drag and drop files, including ajax upload andprogress bar. The idea for this plugin is to keep it very simple. Basic javascript / jQuery knowledge is necesary to use this plugin.

20. Dropzone.js

Dropzone.js is a light weight JavaScript library for jQuery that turns an HTML element into a dropzone. This means that a user can drag and drop a file onto it, and the file gets uploaded to the server via AJAX. It supports image previews and shows nice progress bars.

codegeekz.com

150+ jQuery Drag & Drop Plugins Tutorials with example

HqyInteract is a touch enabled jQuery plugin that lets you create powerful interactions.

PlainDraggable  is a simple and high performance library to allow HTML/SVG element to be dragged.

Features:

  • Accept HTML/SVG element as an element that comes to be draggable.
  • Restrict the draggable area.
  • Snap the draggable element to other elements, points, lines, consecutive points (i.e. grid) or something.
  • Use requestAnimationFrame API, translate and will-change CSS if possible, for high performance.

KEditor is a jQuery plugin which provides a content editor with drag and drop snippets.

Gijgo is a set of free open source javascript controls distributed under MIT License. All widgets are high performance, built on top of the jQuery JavaScript Library and with built-in support for Bootstrap and Material Design. They are designed to saves you time and scales with your development process.

Related model design plugin, It works with jQuery well. You can drag and swap each of grids and properties.

Fileuploader is a beautiful and powerful HTML5 file uploading tool. A jQuery and PHP plugin that transforms the standard file input into a revolutionary and fancy field on your page.

  • File preview with image thumbnail or icon
  • File image thumbnail can be generated in canvas to resize it perfectly for given with and height
  • Render synchron the file preview
  • File icon background is generated from file extension
  • Customize your own input and thumbnail elements
  • Responsive and fancy animations
  • Choose multiple files from different folders
  • Drag&Drop feature
  • Upload each file with Ajax
  • Upload synchron the files
  • Upload progressbar with many data available
  • Start, retry and cancel upload actions
  • Paste images from clipboard (only in Chrome)
  • Validate the file’s limit, size and extension. You can also use your own function
  • Edit mode for already uploaded files
  • All files are in one list in a hidden input
  • Use input HTML attributes to configurate it
  • HTML template renderer using Text variables
  • CSS file icon
  • PHP upload helper
  • PHP generates an array with many file informations
  • PHP can create a custom file name
  • API and more than 24 Callbacks to manipulate freely the appearance and functionality of your file input

A Basic jQuery library to arrange/order DOM elements by dragging.This plugin doesn’t require any CSS change, just call the function on elements you want to be arranged, and you are done.

Simple Drag & Drop Email builder with responsible HTML export.Just build an Email, export him as HTML and send it!.You can install it in any Virtual Hosts you want, like Apache, Nginx, NodeJS and others.

Features:

  • Material Design & Icons
  • TinyMCE text editor
  • Upload your own images
  • Import Email
  • Export Email as JSON and HTML
  • Responsive HTML
  • Preview Email
  • Less files

Table-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table.

Features:

  • Super easy to set up
  • Cellspacing, cellpadding, col and colgroup in account
  • Able to sort columns or rows at the same time
  • Smooth animation when sort
  • No bloated dependencies
  • Touch events

Bal is a drag & drop email builder plugin based on Jquery for developer. You can simply integrate this script in your web project and create custom email template with drag & drop. It can be installed on any website.

Features:

  • Email Templates
  • 50+ different options
  • 5 language support
  • Customize very easily with Context menu
  • Edit any element with source code (Live Html Editing)

www.bestjquery.com

jQuery Sortable

afterMove function ($placeholder, container, $closestItemOrContainer) { } This is executed after the placeholder has been moved. $closestItemOrContainer contains the closest item, the placeholder has been put at or the closest empty Container, the placeholder has been appended to. containerPath The exact css path between the container and its items, e.g. "> tbody" containerSelector The css selector of the containers distance Distance the mouse has to travel to start dragging delay Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element. handle The css selector of the drag handle itemPath The exact css path between the item and its subcontainers. It should only match the immediate items of a container. No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is "> div" itemSelector The css selector of the items bodyClass The class given to "body" while an item is being dragged draggedClass The class giving to an item while being dragged isValidTarget function ($item, container) { return true } Check if the dragged item may be inside the container. Use with care, since the search for a valid container entails a depth first search and may be quite expensive. onCancel function ($item, container, _super, event) { } Executed before onDrop if placeholder is detached. This happens if pullPlaceholder is set to false and the drop occurs outside a container. onDrag function ($item, position, _super, event) { $item.css(position) } Executed at the beginning of a mouse move event. The Placeholder has not been moved yet. onDragStart function ($item, container, _super, event) { $item.css({ height: $item.outerHeight(), width: $item.outerWidth() }) $item.addClass(container.group.options.draggedClass) $("body").addClass(container.group.options.bodyClass) } Called after the drag has been started, that is the mouse button is being held down and the mouse is moving. The container is the closest initialized container. Therefore it might not be the container, that actually contains the item. onDrop function ($item, container, _super, event) { $item.removeClass(container.group.options.draggedClass).removeAttr("style") $("body").removeClass(container.group.options.bodyClass) } Called when the mouse button is being released onMousedown function ($item, _super, event) { if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) { event.preventDefault() return true } Called on mousedown. If falsy value is returned, the dragging will not start. Ignore if element clicked is input, select or textarea placeholderClass The class of the placeholder (must match placeholder option markup) placeholder '<li></li>' Template for the placeholder. Can be any valid jQuery input e.g. a string, a DOM element. The placeholder must have the class "placeholder" pullPlaceholder If true, the position of the placeholder is calculated on every mousemove. If false, it is only calculated when the mouse is above a container. serialize function ($parent, $children, parentIsContainer) { var result = $.extend({}, $parent.data()) if(parentIsContainer) return [$children] else if ($children[0]){ result.children = $children } Specifies serialization of the container group. The pair $parent/$children is either container/items or item/subcontainers. tolerance Set tolerance while dragging. Positive values decrease sensitivity, negative values increase it.

johnny.github.io

jQuery Sortable

afterMove function ($placeholder, container, $closestItemOrContainer) { } This is executed after the placeholder has been moved. $closestItemOrContainer contains the closest item, the placeholder has been put at or the closest empty Container, the placeholder has been appended to. containerPath The exact css path between the container and its items, e.g. "> tbody" containerSelector The css selector of the containers distance Distance the mouse has to travel to start dragging delay Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element. handle The css selector of the drag handle itemPath The exact css path between the item and its subcontainers. It should only match the immediate items of a container. No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is "> div" itemSelector The css selector of the items bodyClass The class given to "body" while an item is being dragged draggedClass The class giving to an item while being dragged isValidTarget function ($item, container) { return true } Check if the dragged item may be inside the container. Use with care, since the search for a valid container entails a depth first search and may be quite expensive. onCancel function ($item, container, _super, event) { } Executed before onDrop if placeholder is detached. This happens if pullPlaceholder is set to false and the drop occurs outside a container. onDrag function ($item, position, _super, event) { $item.css(position) } Executed at the beginning of a mouse move event. The Placeholder has not been moved yet. onDragStart function ($item, container, _super, event) { $item.css({ height: $item.outerHeight(), width: $item.outerWidth() }) $item.addClass(container.group.options.draggedClass) $("body").addClass(container.group.options.bodyClass) } Called after the drag has been started, that is the mouse button is being held down and the mouse is moving. The container is the closest initialized container. Therefore it might not be the container, that actually contains the item. onDrop function ($item, container, _super, event) { $item.removeClass(container.group.options.draggedClass).removeAttr("style") $("body").removeClass(container.group.options.bodyClass) } Called when the mouse button is being released onMousedown function ($item, _super, event) { if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) { event.preventDefault() return true } Called on mousedown. If falsy value is returned, the dragging will not start. Ignore if element clicked is input, select or textarea placeholderClass The class of the placeholder (must match placeholder option markup) placeholder '<li></li>' Template for the placeholder. Can be any valid jQuery input e.g. a string, a DOM element. The placeholder must have the class "placeholder" pullPlaceholder If true, the position of the placeholder is calculated on every mousemove. If false, it is only calculated when the mouse is above a container. serialize function ($parent, $children, parentIsContainer) { var result = $.extend({}, $parent.data()) if(parentIsContainer) return [$children] else if ($children[0]){ result.children = $children } Specifies serialization of the container group. The pair $parent/$children is either container/items or item/subcontainers. tolerance Set tolerance while dragging. Positive values decrease sensitivity, negative values increase it.

johnny.github.io


Смотрите также