• Stars
    star
    860
  • Rank 53,022 (Top 2 %)
  • Language
    CoffeeScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

jQuery Gridly

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

Installation

To install copy the javascripts and stylesheets directories into your project and add the following snippet to the header:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js" type="text/javascript"></script>
<script src="javascripts/jquery.gridly.js" type="text/javascript"></script>
<link href="stylesheets/jquery.gridly.css" rel="stylesheet" type="text/css" />

This plugin is also registered under http://bower.io/ to simplify integration. Try:

npm install -g bower
bower install gridly

Lastly this plugin is registered as a https://rails-assets.org/ to simplify integration with Ruby on Rails applications:

Gemfile

+ source 'https://rails-assets.org'
...
+ gem 'rails-assets-gridly'

application.css

/*
 ...
 *= require gridly
 ...
*/

application.js

//= require jquery
...
//= require gridly

Examples

Setting up a gridly is easy. The following snippet is a good start:

<style>
  .brick.small {
    width: 140px;
    height: 140px;
  }

  .brick.large {
    width: 300px;
    height: 300px;
  }
</style>

<div class="gridly">
  <div class="brick small"></div>
  <div class="brick small"></div>
  <div class="brick large"></div>
  <div class="brick small"></div>
  <div class="brick small"></div>
  <div class="brick large"></div>
</div>

<script>
  $('.gridly').gridly();
</script>

Configuration

Gridly uses a fairly standard pattern for handling grids and offers three configuration options for sizing: base, gutter and columns:

$('.gridly').gridly({
  base: 60, // px 
  gutter: 20, // px
  columns: 12
});

When using the drag and drop sorting callbacks can be passed in when initializing:

var reordering = function($elements) {
  // Called before the drag and drop starts with the elements in their starting position.
};

var reordered = function($elements) {
  // Called after the drag and drop ends with the elements in their ending position.
};

$('.gridly').gridly({
  callbacks: { reordering: reordering , reordered: reordered }
});


$('.gridly').gridly('draggable', 'off'); // disables dragging
$('.gridly').gridly('draggable', 'on);  // enables dragging

Contributing

Gridly is maintained in CoffeeScript. All contributions need to be submitted in CoffeeScript. The project includes a Cakefile that can be used to compile all assets (see: cake watch). For more information about CoffeeScript see:

Status

Status

Copyright

Copyright (c) 2013 - 2015 Kevin Sylvestre. See LICENSE for details.

More Repositories

1

jquery-growl

Growler is a jQuery plugin designed to provide informative messages in the browser.
CSS
409
star
2

jquery-age

Age is a jQuery plugin that formats and tracks dates and times as human readable text.
CSS
157
star
3

jquery-lighter

A jQuery plugin for zoomable images.
CSS
53
star
4

omniai

OmniAI standardizes the APIs for multiple AI providers like OpenAI's Chat GPT, Mistral's LeChat, Claude's Anthropic and Google's Gemini.
Ruby
44
star
5

jquery-spin

A jQuery plugin for CSS and JS spinners.
CSS
25
star
6

attached

A file attachment tool that lets users upload to the cloud
Ruby
22
star
7

graphql-sources

A collection of common GraphQL sources for working with Ruby on Rails.
Ruby
22
star
8

jquery-modal

Modal is a jQuery plugin for showing overlapping dialogue prompts.
CSS
18
star
9

enigma

An Enigma machine in Ruby (rotors, reflectors, plugboard and all).
Ruby
16
star
10

rhino

A Rack web server written in Ruby from scratch.
Ruby
16
star
11

setup

Setup Mac OS X for iOS, Ruby, Node, Pow, Postgres, and all things developer!
Shell
14
star
12

jquery-observer

A jQuery plugin for observing form changes
CSS
14
star
13

jquery-carousel

A jQuery plugin for scrolling gallery.
CSS
9
star
14

identifier

A Ruby unique identifier generate
Ruby
7
star
15

formula

A Rails form generator that creates simple markup
Ruby
7
star
16

raphael-analytics

A Raphael plugin for analytics
JavaScript
7
star
17

serializer

A serialized attribute accessor gem with support for types and defaults
Ruby
5
star
18

tights

Tights is a set of React components for Bulma.
TypeScript
5
star
19

specifier

A Ruby spec tool built from scratch.
Ruby
3
star
20

grid

Grid
CSS
3
star
21

playground

A sample application used to try things...
Ruby
3
star
22

veneer

Objective-C
3
star
23

jquery-progress

A jQuery plugin for simple progress bars
JavaScript
3
star
24

jquery-suggest

A jQuery plugin for autocomplete inputs
JavaScript
3
star
25

erroneous

A view helper that creates simple markup for inline errors
Ruby
3
star
26

jquery-spinner-rails

Ruby
3
star
27

ngineer

A configuration and management tool for Rack applications using Nginx and Foreman.
Ruby
2
star
28

personal

Blog
Ruby
2
star
29

transferhq

An HTML and Flash direct to the cloud file transfer service
JavaScript
2
star
30

jquery-transfer

A jQuery plugin for automatic file uploads
JavaScript
2
star
31

omniai-openai

An implementation of the OmniAI interface for OpenAI.
Ruby
2
star
32

omniai-mistral

An implementation of the OmniAI interface for Mistral.
Ruby
2
star
33

bun-orb

A CircleCI Orb to simplify the installation of Bun
Shell
2
star
34

jquery-gallery

A jQuery plugin for image zooming.
JavaScript
2
star
35

gethearts

Hearts
TypeScript
2
star
36

geography

Objective-C
2
star
37

react-activestorage

A hook to simplify integration of ActiveStorage with React
TypeScript
2
star
38

zencodeit

Zencodeit is an open video hosting platform built in Ruby on Rails using Zencoder.
Ruby
1
star
39

schoolyard

A playground for working on Swift
Ruby
1
star
40

picturesque

An engine for images
Ruby
1
star
41

ra

A ray tracer built with Ruby.
Ruby
1
star
42

omniai-google

An implementation of the OmniAI interface for Google.
Ruby
1
star
43

omniai-anthropic

An implementation of the OmniAI interface for Anthropic.
Ruby
1
star
44

caller

Caller is a Sinatra and Backbone online telephony to make calls to phones.
JavaScript
1
star
45

reason

An iOS library for bootstraping projects
Objective-C
1
star
46

pdf-my-url

A basic ruby-on-rails interface to http://pdfmyurl.com/
Ruby
1
star
47

rest

Objective-C
1
star
48

voyageai

A ruby client for VoyageAI
Ruby
1
star
49

vue-file

Vue File is designed to make selecting files a breeze! Vue File supports single and multi selection, drag and drop, and instructions for Amazon Simple Storage Solution or Google Cloud Storage.
JavaScript
1
star
50

encore

Encore eliminates duplicate calls by queueing callbacks.
Objective-C
1
star