Skip to content

Instantly share code, notes, and snippets.

View tinothepro's full-sized avatar

Sean Tolentino tinothepro

View GitHub Profile
@tinothepro
tinothepro / carousel.js
Created August 8, 2017 14:34
Turn MyBookTable shortcode results into carousel
<?php
Container::make('post_meta', 'WPD Layout Builder')
->show_on_post_type(array('page', 'portfolio'))
->add_fields(array(
Field::make('complex', 'sections', 'Sections')
->setup_labels($section_labels)
->set_layout('tabbed-vertical')
// Begin Content Section
@tinothepro
tinothepro / carousel.js
Last active May 24, 2017 17:46
Carbon Slideshow plugin
// Utilized for mobile navigation and sticky nav when scrolling
jQuery(function ($) {
if (document.documentElement.clientWidth >= 768) {
if (window.location.pathname != '/work/') {
var height = $(window).height();
var siteHeader = document.getElementsByClassName('site-header')[0];
siteHeader.style.height = height + 'px';
}
@tinothepro
tinothepro / team.js
Last active November 14, 2016 20:31
// Used to cycle through teammates on http://works-progress.com/about-us/
// Initialize counter
var c = 0;
// Count team size minus 1 to account for 0 based array
var teamSize = (document.getElementsByClassName('teammate-info').length - 1);
// Assign to first teammate