-
Notifications
You must be signed in to change notification settings - Fork 46
Home
dotjay edited this page Oct 6, 2012
·
5 revisions
Welcome to the hashgrid wiki!
Most of what you need to know is in the code or over at hashgrid.com, but here’s a little information to get you started.
Enjoy!
hashgrid will work out of the box… all you need to do is tweak the CSS to give you the grid you’re after. But you can also do a few things to customise hashgrid.
You can call hashgrid from your own JavaScript code, but it’s loaded at the end of hashgrid.js for your convenience. Feel free to rip that out if you don’t need it and then call hashgrid like this:
var grid = new hashgrid();
But there are a whole bunch of additional options you can set:
var grid = new hashgrid({
id: 'mygrid', // set a custom id for the grid container
modifierKey: 'alt', // optional 'ctrl', 'alt' or 'shift'
showGridKey: 's', // key to show the grid
holdGridKey: 'enter', // key to hold the grid in place
foregroundKey: 'f', // key to toggle foreground/background
jumpGridsKey: 'd', // key to cycle through the grid classes
numberOfGrids: 2, // number of grid classes used
classPrefix: 'myclass', // prefix for the grid classes
cookiePrefix: 'mygrid' // prefix for the cookie name
});
If you want your grid to start in the foreground rather than the background, you can do this in your CSS:
#grid{
z-index: 9999;/* Make #grid start in foreground */
}
- A CSS generator to make building grids even easier. David Sleight has suggested a collaboration with [Gridulator](http://gridulator.com/).