This file contains hidden or 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
// Conditional Event Handling | |
$('#target').click(function(e) { | |
if ( $(e.target).is('a') ) { | |
// code | |
// e.preventDefault(); | |
} | |
}); |
This file contains hidden or 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
// Add Class on Hover | |
$('#target').bind('mouseenter mouseleave', function(e){ | |
$(this).toggleClass('active', e.type === 'mouseenter'); | |
})) |
This file contains hidden or 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
// Font Name | |
@font-face { | |
font-family: 'Font Name'; | |
src: url('/assets/fonts/Font-Name.eot'); | |
src: url('/assets/fonts/Font-Name.eot?#iefix') format('embedded-opentype'), | |
url('/assets/fonts/Font-Name.woff') format('woff'), | |
url('/assets/fonts/Font-Name.ttf') format('truetype'), | |
url('/assets/fonts/Font-Name.svg#fontname') format('svg'); | |
font-weight: normal; | |
font-style: normal; |
This file contains hidden or 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 moveBack() { // Simulate Back Button | |
history.back(); | |
} | |
function moveForward() { // Simulate Forward Button | |
history.forward(); | |
} |
This file contains hidden or 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() { | |
return function(elem, type, fn) { | |
if (document.addEventListener) { | |
if (elem && !elem.length) { | |
elem.addEventListener(type, fn, false); | |
} | |
else if ( elem && elem.length) { | |
var len = elem.length; | |
for (var i = 0; i < len; i++) { | |
addEvent(elem[i], type, fn); |
This file contains hidden or 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
/********************************************* | |
MEDIA QUERIES | |
*********************************************/ | |
/* MOBILE PORTRAIT */ | |
@media only screen and (min-width: 320px) { | |
body { | |
} | |
} |
This file contains hidden or 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
# 5G BLACKLIST/FIREWALL (2013) | |
# @ http://perishablepress.com/5g-blacklist-2013/ | |
# 5G:[QUERY STRINGS] | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR] | |
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR] | |
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR] |
This file contains hidden or 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
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
// Create an array of styles. | |
var styles = [ | |
{ | |
stylers: [ | |
{ saturation: -85 } | |
] | |
},{ |
This file contains hidden or 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
<?php if(have_posts()) : while(have_posts()) : the_post(); ?> | |
// code | |
<?php endwhile; endif; ?> |
This file contains hidden or 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 passwordStrength(password) { | |
var $ = jqnc(); | |
var desc = new Array(); | |
desc[0] = "Very Weak"; | |
desc[1] = "Weak"; | |
desc[2] = "Better"; | |
desc[3] = "Medium"; | |
desc[4] = "Strong"; | |
desc[5] = "Strongest"; |