Skip to content

Instantly share code, notes, and snippets.

var arr = [2,5,1,0]
addVar = 0,
n = arr.length,
i = 0, j = 0;
for (i = 1; i < n; i++)
for(j = 0; j < n - i; j++)
if (arr[j]>arr[j+1]) {
addVar=arr[j+1]
arr[j+1]=arr[j];
arr[j]=addVar;
$(document).ready(function() {
$("div").mouseenter(function() {
$(this).fadeTo("fast", 1);
});
$("div").mouseleave(function() {
$(this).fadeTo("fast", 0.25);
});
});
$(document).ready(function() {
$("div").dblClick(function() {
$(this).fadeOut("fast");
});
});