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
//Simple form | |
$("form").submit(function(e) { | |
e.preventDefault(); | |
$.ajax({ | |
type: 'POST', | |
url: 'https://formkeep.com/f/7212a0cb4563', | |
data: $(this).serialize(), | |
success: function() { | |
//window.location = "http://google.com"; |
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
if (url.search("Default.aspx?A=Search")) { | |
$("body").addClass("search"); | |
} |
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
// Coming from secure protocol and user is NOT inside the store, redirect to a non-secure connection | |
if (location.protocol == "https:") { | |
if (url.search("worldsecuresystems.com") < 0) { | |
location.protocol = "http:"; | |
} | |
} |
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 loc = window.location; | |
var url = (location.href); | |
loc.origin || (loc.origin = loc.protocol + '//' + loc.host); | |
url = url.split('?')[0]; | |
var slugs = $.trim((url.replace(loc.origin, '')).split("/").join(" ")); | |
if (slugs == "") { | |
slugs = "home"; | |
} |
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 year = new Date().getFullYear(); |
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
// Break out of iframes | |
if (window != window.top) { | |
top.location.href = location.href | |
} |
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
// demo: http://jsfiddle.net/adamculpepper/9bf2r9uj | |
centerElement($(".center-it.me"), $(".center-it.to")); | |
function centerElement(me, to) { | |
var toWidth = to.outerWidth(); | |
var meWidth = me.outerWidth(); | |
var meCenter = Math.abs(meWidth / 2) - (toWidth / 2); | |
me.css({ |
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
<!-- | |
Stash: http://devot-ee.com/add-ons/stash | |
Strip Line Breaks: http://devot-ee.com/add-ons/strip-line-breaks | |
Low Replace: http://devot-ee.com/add-ons/low-replace | |
--> | |
{exp:stash:set parse_tags="yes" parse_conditionals="yes" parse_depth="5" type="snippet"} | |
{exp:strip_line_breaks} | |
{stash:body_classes} | |
{exp:low_replace find="\t" replace="" regex="yes"} |
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
// Slightly modified version of Angular's method of checking for Internet Explorer (IE), including checking for IE11 | |
function detectIE() { | |
// check 6-10 | |
msie = parseInt((/msie (\d+)/.exec((navigator.userAgent).toLowerCase()) || [])[1]); | |
if (isNaN(msie)) { | |
// not 6-10, check 11 | |
msie = parseInt((/trident\/.*; rv:(\d+)/.exec((navigator.userAgent).toLowerCase()) || [])[1]); | |
} | |
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
/* Formatted for GitHub */ | |
a {outline:1px dotted #D68A85!important;} | |
h1, h2, h3, h4, h5, h6 {outline:1px dotted #E7912D!important;} | |
li {outline:1px dotted #CECC33!important;} | |
span {outline:1px dotted #F0F!important;} | |
div {outline:1px dotted #3AB6F1!important;} | |
ul, ol {outline:1px dotted #8684D8!important;} | |
li {outline:1px dotted #DD67AE!important;} | |
table td {outline:1px dotted lightblue!important;} | |
i {outline:1px dotted gray!important;} |