jQuery UI, snap to grid example, create gridlines?

Go To StackoverFlow.com

4

Trying to use the following demo example, using the 80px x 80px snap to grid demo.

http://jqueryui.com/demos/draggable/#snap-to

Is there someway to show a grid in the background it can snap too? As right now it's just a white background.

2012-04-04 23:59
by Brettski


9

Make an 80 x 80px box with your favorite image editing program, set it as the background of the container, and set:

background-repeat: repeat;

That way, the background will tile.

Rough demonstration: http://jsfiddle.net/mostthingsweb/cRayJ/1/

2012-04-05 00:04
by Chris Laplante
Woah Perfect :) Thank you so much : - Brettski 2012-04-05 01:45
You are welcome. Glad it helps. : - Chris Laplante 2012-04-05 02:10
Ads