Skip to content

Instantly share code, notes, and snippets.

View jerewall's full-sized avatar

Jeremy Wallace jerewall

View GitHub Profile
@jerewall
jerewall / style.css
Last active February 15, 2018 15:54
Call to Action Section with icon flip using ACF
jQuery
------------
$('.hover').hover(function(){
$(this).addClass('flip');
},function(){
$(this).removeClass('flip');
});
-----------
@jerewall
jerewall / global.js
Created December 6, 2017 18:07
Instagram Feed using Advanced Custom Fields
//global.js
Shadowbox.init();
$('.photo-image a').live('click', function (e) {
Shadowbox.setup(jQuery('.photo-image a'));
Shadowbox.open(this);
@jerewall
jerewall / style.scss
Created December 5, 2017 14:34
Fancy Testimonials using Blockquotes
HTML
<blockquote class="testimonial">Jerewall's the best, he's the greatest web developer to ever live!
<span>- Gary Raymond</span></blockquote>
CSS
blockquote.testimonial {
border: 0px;
padding: 60px 40px 50px;
position: relative;
width: 100%;
@jerewall
jerewall / header,php
Last active June 2, 2017 13:57
Wordpress Search Code
<div class="searchbox">
<form role="search" method="get" id="searchform" class="searchform" action="/">
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</form>
</div>
@jerewall
jerewall / global.js
Last active February 16, 2018 18:46
Sticky Nav V3 - no jumps on short pages and responsive
/* Sticky navigation bar - Make the navigation area float after scrolling past it */
var aboveHeight = $('#primary-navigation').offset().top;
jQuery(window).scroll(function () {
if ($(window).scrollTop() > aboveHeight && $(window).width() > 780) {
$('.header').css({
'position': 'fixed',
'top': -90,
@jerewall
jerewall / header.php
Created February 22, 2017 19:26
wordpress search form
<div class="form">
<form role="search" method="get" id="searchform" class="searchform" action="/">
<input type="text" value="" name="s" id="s" placeholder="Search" />
</form>
</div>
@jerewall
jerewall / js.js
Created October 24, 2016 17:49
Scroll Class - add classes on scroll
//ex on signals defense
var header = $(".header");
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 1) {
header.addClass('small');
@jerewall
jerewall / js.js
Created October 17, 2016 15:20
modal thiny jquery
=== GLOBAL.JS INFORMATION ===
$('.close').click(function(e){
e.preventDefault();
$(".overlay").fadeOut(500);
});
$('.pop').click(function(e){
e.preventDefault();
$(".overlay").fadeIn(500);
@jerewall
jerewall / global.js
Created October 12, 2016 15:51
make the text area all the same size on cta to push down learn more button to be lined up equally.
$(window).on('load resize', function () {
if ($(window).width() > 780) {
var tallest = 0;
$(".webcom-cta .widget-textarea").each(function(){
if($(this).outerHeight() > tallest) tallest = $(this).outerHeight();
}).css('height', tallest);
}
}).resize();
@jerewall
jerewall / global.js
Last active September 29, 2016 15:06
​ Make any site have a floating navigation, even if Wordpress Admin Bar is present! UPDATED
//Sticky navigation bar - Make the navigation area float after scrolling past it//
var aboveHeight = $('#primary-navigation').offset().top;
jQuery(window).scroll(function() {
if ($(window).scrollTop() > aboveHeight) {
$('.header').css({
position: 'fixed',
top: 0,
'z-index': 9999,
'max-width': 1200,