Skip to content

Instantly share code, notes, and snippets.

View JacobLett's full-sized avatar
🤠
hello!

Jacob Lett JacobLett

🤠
hello!
View GitHub Profile
@JacobLett
JacobLett / bootstrap-4.1.1-utility-classes.css
Created October 14, 2020 00:44 — forked from kiley0/bootstrap-4.1.1-utility-classes.css
only the utility classes from bootstrap 4
.align-baseline {
vertical-align: baseline !important;
}
.align-top {
vertical-align: top !important;
}
.align-middle {
@JacobLett
JacobLett / max_width_email.html
Created April 6, 2018 19:16 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
- [Complete List of HTML Meta Tags](https://gist.github.com/whitingx/3840905)
- [List of Usable HTML Meta and Link Tags](https://gist.github.com/kevinSuttle/1997924)
- [HTML5 Boilerplate explanations and suggestions of header tags](http://html5boilerplate.com/docs/head-Tips/)
- [Dublic Core Meta Tags](http://www.seoconsultants.com/meta-tags/dublin/)
- [Apple Meta Tags](http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html)
- [OpenGraph Meta Tags](http://opengraphprotocol.org/)
- [Link Tag Meaning](http://intertwingly.net/wiki/pie/LinkTagMeaning)
- [Google Chrome HTML5 Tags](http://www.html5rocks.com/)
document.addEventListener("DOMNodeInserted",function(event){addlink(event)},false);
function addlink(event){
var node = event.target;
if(node instanceof HTMLLIElement){
}
}
@JacobLett
JacobLett / GA.js
Last active April 1, 2016 18:05 — forked from huobazi/GA.js
Classic Google Analytics code - ga.js
// Google Analytics
(function(window, document, undefined) {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'XXX']);
_gaq.push(['_setDomainName', 'XXX']);
_gaq.push(['_trackPageview', document.location.pathname +
document.location.search + document.location.hash]);
(function(d, t) {
var ga = d.createElement(t);
@JacobLett
JacobLett / iframe_defer.js
Created March 8, 2016 03:37 — forked from bjmiller121/iframe_defer.js
Defer loading of iframes
/**
* Defer iframe loading.
*
* Markup:
* <div class="defer-iframe" data-src="{SOURCE URL}" data-{ATTR}="{VAL}"></div>
*/
$(window).load( function(){
if ($('.defer-iframe').length) {
$('.defer-iframe').each( function() {
var $iframe = $('<iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>');
@JacobLett
JacobLett / bootstrap_3_full_class_list
Created January 29, 2016 14:15 — forked from cosmicscr/bootstrap_3_full_class_list
bootstrap 3 full class list
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
@JacobLett
JacobLett / bootsrap class list
Last active February 19, 2017 15:21 — forked from geksilla/bootsrap_class_list
Bootstrap css class list
.active
.affix
.alert
.alert-danger
.alert-dismissible
.alert-info
.alert-link
.alert-success
.alert-warning
.arrow
@JacobLett
JacobLett / front-page.php
Created November 2, 2015 16:37 — forked from arelthia/front-page.php
Pods find (query) based on field value - Used on Genesis home page
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'tht_featured_home', 5 );
function tht_featured_home() {
$where = "book_featured.meta_value='1'";
$params = array(
'where'=> $where,
'order' => 'ASC',
'limit' => 1,
@JacobLett
JacobLett / jquery_snippets.js
Created October 7, 2015 12:58
Collection of snippets for jquery
//---- Center an element in the center of your screen.
$(document).ready(function() {
jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
return this;
}
});