Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI, snap to grid example, create gridlines?

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.

like image 682
Brettski Avatar asked Apr 04 '12 23:04

Brettski


1 Answers

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/

like image 133
Chris Laplante Avatar answered Sep 19 '22 16:09

Chris Laplante