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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
<!-- Prompt IE6 users to install Chrome Frame --> | |
<!--[if lt IE 7 ]> | |
<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script> | |
<script>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script> | |
<![endif]--> |
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
/* For modern browsers */ | |
.cf:before, | |
.cf:after { | |
content:""; | |
display:block; | |
} | |
.cf:after { | |
clear:both; | |
} |
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)) { |
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 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
.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
.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
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 ); |
OlderNewer