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
<?php | |
// Add cart count and value to Cart Element text in a Pro header | |
// ============================================================================= | |
add_filter('woocommerce_add_to_cart_fragments', 'mb_cart_count_fragments', 10, 1); | |
function mb_cart_count_fragments($fragments) { | |
$count = WC()->cart->get_cart_contents_count(); | |
$value = ($count == 0) ? '$0.00' : WC()->cart->get_cart_total(); | |
$cart = ($count == 0) ? 'Cart' : 'Items: ' . $count; |
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
<?php | |
// Add visual indicator to pages and posts built in Pro | |
// ============================================================================= | |
function bourne_identity_columns( $columns ) { | |
$myCustomColumns = array( | |
'probuilder' => __( 'Builder' ) | |
); | |
$columns = array_merge( $columns, $myCustomColumns ); |
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
(function(){ var config = cornerstoneApp.lookup('service:store').peekRecord('option','cornerstone_font_config');config.set('value.customItems', [ { family: 'MikesFont', stack: 'MikesFont, sans-serif', weights: [ '300', '500' ]}]);config.save()})(); |
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
jQuery(document).ready(function($){ | |
// The X/Pro "Added to cart" overlay | |
var notification = $('.x-cart-notification'); | |
$(".single_add_to_cart_button").on('click', function(e) { | |
e.preventDefault(); | |
var quantity = $('input[name="quantity"]').val(), |
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
(function($) { | |
$('a[href^="#"]:not(a[href="#"])').unbind('touchend click').on('touchend click', function(e) { | |
var target = $(this.hash); | |
if (target.length) { | |
e.preventDefault(); | |
e.stopImmediatePropagation(); | |
var headerHeight = 50; // put your offset here in px |
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
(function($){ | |
$(window).on('ready load resize', function(){ | |
var max = 0, | |
mobile = $(window).width(), | |
numChildren = $('.jsmethodgrid').first().children().size(); | |
$(".jsmethodgrid .x-column").css('min-height','inherit'); | |
if ( mobile > 767 ){ | |
$('.jsmethodgrid .x-column').css({ 'width' : 100/numChildren + '%', 'margin': 0 }); |
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
(function($){ | |
$(window).on('load resize', function() { | |
$(".equalize").each(function(index, el) { | |
var max = 0, | |
mobile = $(window).width(); | |
$(this).find(".x-column").css('min-height', 'inherit'); | |
$(this).find(".x-column").css('height', 'auto'); | |
if ( mobile > 767 ){ | |
$(this).find(".x-column").each(function(index, el) { | |
if( $(this).outerHeight() > max ){ |
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
(function($){ | |
$(window).on('ready load resize', function(){ | |
var max = 0, | |
mobile = $(window).width(); | |
$(".equalize .x-column").css('min-height', 'inherit'); | |
if ( mobile > 767 ){ | |
$(".equalize .x-column").each(function(index, el) { | |
if( $(this).outerHeight() > max ){ | |
max = $(this).outerHeight(); |
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
@media (min-width: 768px){ | |
.timeline { | |
position: relative; | |
z-index: 1; | |
} | |
.timeline::before { | |
content:""; | |
position: absolute; | |
z-index: 1; | |
top: 0; |
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
jQuery(document).ready(function($){ | |
// Detect if this is a hero image page by looking for the #heroimage ID | |
if( $('#heroimage').length ){ | |
// get the value of the bottom of the #heroimage element by adding the offset of that element plus its height, set it as a variable | |
var mainbottom = $('#heroimage').offset().top + $('#heroimage').outerHeight(true); | |
$(window).on('scroll',function(){ | |
var stop = Math.round($(window).scrollTop()); | |
// If the use has scrolled past the bottom of the hero image |