Giter Site home page Giter Site logo

gridded.js's Introduction

#gridded.js

A simple jQuery tile based grid.

Examples

Simple

This is a simple way to call Gridded where you can supply the width and height for the tiles as data attributes. Demo

jQuery
$(function() {
	$('.container').gridded();
});
HTML
<div class='container'>
  <div class='item' >1</div>
  <div class='item' >2</div>
  <div class='item' data-w="2">3</div>
  <div class='item' data-w="2" data-h="1">4</div>
  <div class='item' >5</div>
  <div class='item' >6</div>
  <div class='item' data-h="2">7</div>
  <div class='item' >8</div>
  <div class='item' >9</div>
  <div class='item' >10</div>
  <div class='item' data-w="1">11</div>
</div>

Options

  • numOfCols

Todo's

  • Allow to set predefined sizes to choose from
{
  sizes: array(1=>2, 3=>33) 
}

key being width value being height

gridded.js's People

Contributors

last1here avatar

Watchers

 avatar

gridded.js's Issues

When using breakpoints item sizes can become deformed

When using breakpoints with noOfCols if you have an item with w:3 h:3 if you have a breakpoint which changes noOfCols to 2 an the browser is resized the item will end up with w:2 h:3 and will be set like this till refresh. Due to line 98 & 99

else if (i.data('w') > that.options.col)
   i.data('w', that.options.col);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.