Skip to content

Instantly share code, notes, and snippets.

View adesignl's full-sized avatar

Chad Pierce adesignl

View GitHub Profile
/* Functions
**************************************************************/
var windowWidth = $(window).width();
// Mobile Menu Function
function mobileMenu(menu){
var mainMenu = $(menu),
menuButton = mainMenu.before('<a href="#" class="menuButton"><i class="icon"></i>Menu</a>');
$('.menuButton').on('click', function(e){
@adesignl
adesignl / gist:8977449
Created February 13, 2014 15:44
RSS Feed from Google Search
https://news.google.com/news/feeds?gl=us&hl=en&ie=UTF-8&output=rss&q=SEARCH TERMS GO HERE&um=1
@adesignl
adesignl / gist:7895626
Created December 10, 2013 18:33
Grab Parameters From Tracking URL And Append Them To A Link On Your Site For Further Use.
function GetURLParameter(sParam){
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++){
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam){
return sParameterName[1];
}
}
}
@adesignl
adesignl / share.html
Created July 31, 2013 18:27
Social Sharing With Jinja Syntax
<div class="social">
<span>Share:</span>
<a href="http://www.facebook.com/share.php?u={{content.absolute_url}}" target="_blank" class="facebook">facebook</a>
<a href="https://twitter.com/share?text={{ content.name|striptags }}&url={{content.absolute_url}}&hashtags=weareawesome&via=bluleadz" target="_blank" class="twitter">twitter</a>
<a href="https://plus.google.com/share?url={{content.absolute_url}}" target="_blank" class="google">google+</a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url={{content.absolute_url}}" target="_blank" class="linkedin">linkedin</a>
</div>
@adesignl
adesignl / gist:6064193
Created July 23, 2013 17:13
sniff for ios device using javascript
var iOS = ( navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false );
@adesignl
adesignl / email-responsive.html
Created July 22, 2013 17:25
Hubspot Responsive Email
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Campaign Monitor Newsletter</title>
<style>
a:hover {
text-decoration: underline !important;
@adesignl
adesignl / gist:6054630
Created July 22, 2013 15:14
Email Helper
<!--***********************************************************************************************
* Dont Rip Off Other People Work - If you would like to use something from the site or would
* like to know how we did somthing please just shoot me an email: chad@bluleadz.com
* Copyright @ 2013 - Bluleadz Inbound Marketing
* 866.995.8720
* ebaum@bluleadz.com
-//////////.
ohyyyyyyyyh/
ohyyyyyyyyh/
@adesignl
adesignl / app.js
Created July 11, 2013 20:23
Double Tap.js
$(function(){
// Prevent click event on first tap on mobile devices
var parent = $('li.hs-item-has-children ');
$(parent).doubleTapToGo();
});
@adesignl
adesignl / md5-hash.js
Created June 23, 2013 02:13
Create a gravitar with jquery.
<p><u>Using jQuery MD5 Plugin</u>
</p>
<br/>Enter Value :
<input type="text" id="txtValue" />
<br/>
<br/>
<div id="dvValue"></div>
<?php
if ($_SERVER['REQUEST_METHOD'] == "GET") {
header('Location:http://thefreshdish.com');
$gtwPost = "";
//Create string for GoToWebinar from same form POST data
$gtwPost = "WebinarKey=" . urlencode($_GET['WebinarKey'])
. "&Form=" . urlencode($_GET['Form'])
. "&Name_First=" . urlencode($_GET['firstName'])