This time I will share jQuery Plugin and tutorial about Dynamic Drag and Drop Grid Layout Plugin With jQuery – Gridly, hope it will help you in programming stack.
Gridly is a touch-enabled, jQuery based draggable grid layout plugin that allows your visitors to dynamically rearrange grid items through drag’n’drop or touch events.
How to use it:
1. Include the necessary jQuery library on the web page
1 |
< script src = "/path/to/cdn/jquery.min.js" ></ script >< br > |
2. Include the jQuery Gridly plugin’s files on the page, after jQuery library.
1 |
< link href = "stylesheets/jquery.gridly.css" rel = "stylesheet" /> |
2 |
< script src = "javascripts/jquery.gridly.js" ></ script > |
3. Insert grid items to the gridly.
1 |
< section class = "example" > |
3 |
< div class = "brick" ></ div > |
4 |
< div class = "brick" ></ div > |
5 |
< div class = "brick" ></ div > |
6 |
< div class = "brick" ></ div > |
4. The example CSS styles for the grid.
5. Initialize the draggable grid layout.
6. All default settings to config the grid layout.
7. Callback functions.
04 |
reordering: function ($elements) { |
07 |
reordered: function ($elements) { |
8. Enable/disable the draggable functionality.
1 |
$( '.gridly' ).gridly( 'draggable' , 'on); |
2 |
$(' .gridly ').gridly(' draggable ', ' off'); |
Changelog:
v1.3.0 (2020-07-01)
- Updated to the latest version
- Updated doc accordingly
v1.2.9 (2015-05-28)
- updated to the latest version
v1.2.8 (2015-01-24)
- updated to the latest version
v1.2.6 (2014-12-17)
- updated to the latest version
v1.2.5 (2014-12-06)
- updated to the latest version
v1.2.3 (2014-02-11)
- updated to the latest version
v1.2.0 (2013-09-06)
- updated to the latest version
- demo page updated
v1.1.8 (2013-08-26)
- fixing a bug where the ‘close’ button is draggable
This awesome jQuery plugin is developed by ksylvest. For more Advanced Usages, please check the demo page or visit the official website.