Skip to content

Instantly share code, notes, and snippets.

@fulminator
Created February 8, 2013 16:48
Show Gist options
  • Save fulminator/4740262 to your computer and use it in GitHub Desktop.
Save fulminator/4740262 to your computer and use it in GitHub Desktop.
$(document).ready(function(e) {
var images = [
"time",
"clock",
"calendar",
"balance",
"text",
"visual",
"rubik",
"note",
"frames",
"games",
"chart",
"image",
"navigation",
"search",
"shield",
"misc",
];
var titles = [
"Alert and Prompt",
"Date and Time",
"Calendars",
"Calculators&Convertors",
"Text Effects",
"Visual Scripts",
"Development",
"Form Scripts",
"Frame Scripts",
"Game Software",
"Graphs and Charts",
"Media Effects",
"Navigation Scripts",
"Search Scripts",
"Security Scripts",
"Miscellaneous"
];
for (var i = 0; i < 16; i++) {
$('#container').append("<div class='box'><img src='" + images[i] +".png' /><br /><h5>"+ titles[i] +"</h5></div>");
$('#container').append("<div style='height:150px; float:left'></div>");
}
$(".box").css("float", "left")
.css("text-align", "center")
.css("font-family", "'Courier New', Courier, monospace")
.css("color", "#000")
.css("width", "150px")
.css("height", "150px");
$(".box").hover(function () {
$(this).css("color","#ff3d0d");
$(this).animate({"marginTop": "-=20px"}, "fast");
},
function () {
$(this).css("color","#000");
$(this).animate({"marginTop": "+=20px"}, "fast");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment