This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function crescente (index1, index2){return index1 - index2;} | |
function decrescente (index1, index2){return index2 - index1;} | |
var ar = [2, 5, 4, 9, 1, 3, 6, 7, 8, 0]; | |
ar.sort(crescente); | |
ar.sort(decrescente); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************* | |
Cross Browser Gradient Backgrounds | |
v1.0 | |
Last Revision: 11.03.2005 | |
steve@slayeroffice.com | |
please leave this notice in tact. | |
should you improve upon this code, please |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trocarcss(title) { | |
var i, a, main; | |
for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { | |
if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { | |
a.disabled = true; | |
if(a.getAttribute("title") == title) a.disabled = false; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Flip Menu</title> | |
<style type="text/css"> | |
body { | |
text-align: center; | |
background: #676767; | |
font-family: helvetica; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var addEvent = (function( window, document ) { | |
if ( document.addEventListener ) { | |
return function( elem, type, cb ) { | |
if ( elem && !elem.length ) { | |
elem.addEventListener(type, cb, false ); | |
} | |
else if ( elem && elem.length ) { | |
var len = elem.length; | |
for ( var i = 0; i < len; i++ ) { | |
addEvent( elem[i], type, cb ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button { | |
display: inline-block; | |
margin: 20px; | |
padding: 3px 6px; | |
font-family: 'Lucida Grande', Arial, sans-serif; | |
font-size: 13px; | |
font-weight: semibold; | |
-webkit-border-radius: 3px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ir{ | |
border:0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function valida_cpf(cpf) { | |
var numeros, digitos, soma, i, resultado, digitos_iguais; | |
digitos_iguais = 1; | |
if (cpf.length < 11) return false; | |
for (i = 0; i < cpf.length - 1; i++) | |
if (cpf.charAt(i) != cpf.charAt(i + 1)) { | |
digitos_iguais = 0; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".numerico").keypress(function(e){ | |
var charcode = e.keyCode ? e.keyCode : e.which; | |
if(charcode < 48 || charcode > 57){ | |
e.preventDefault(); | |
return false; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(d) { | |
var tags = d.body.getElementsByTagName('*'); | |
var i = tags.length; | |
while (i--) { | |
var attr = tags[i].attributes; | |
var ii = attr.length; | |
while (ii--) { | |
if (attr[ii].name.match(/^on/i)) { |