Skip to content

Instantly share code, notes, and snippets.

@LinuxDoku
Created July 1, 2010 15:36
Show Gist options
  • Save LinuxDoku/460128 to your computer and use it in GitHub Desktop.
Save LinuxDoku/460128 to your computer and use it in GitHub Desktop.
function loadmap() {
// config
imageX = 326;
imageY = 271;
iX = 0;
iY = 0;
// create new div's for each image px
// start with X
while(iX <= imageX)
{
// create one for all Y Coords
while(iY <= imageY)
{
// now create the div
$('p').append('<span><img src="map.png" width="1" height="1" /></span>');
iY++
}
$('p').append('<br>');
iX++;
iY = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment