Skip to content

Instantly share code, notes, and snippets.

View colorful-tones's full-sized avatar
💓
Don’t believe the hype!

Damon Cook colorful-tones

💓
Don’t believe the hype!
View GitHub Profile
( function($) {
var menuToggle = $('.menu-toggle');
var overlay = $('.overlay');
var closeButton = $('.overlay-close');
var searchToggle = $('.search-toggle');
var searchForm = $('.search-form');
var ww = window.innerWidth;
@colorful-tones
colorful-tones / wds-back-to-top.js
Created December 17, 2015 21:43 — forked from gregrickaby/wds-back-to-top.js
WDS Javascript Back To Top
/**
* Back To Top.
*/
window.Back_To_Top = {};
( function( window, $, that ) {
// Private variables.
var minWidth = 768;
var minHeight = 200;
@colorful-tones
colorful-tones / wds-javascript-style.js
Created February 10, 2016 18:07 — forked from gregrickaby/wdsjQuery.js
WDS Javascript Style
/**
* Foo Script.
*/
window.Foo_Object = {};
( function( window, $, that ) {
// Private variable.
var fooVariable = 'foo';
// Constructor.
function bp_rename_profile_tabs() {
buddypress()->members->nav->edit_nav( array(
'name' => __( 'Dashboard', 'textdomain' ),
'slug' => __( 'dashboard', 'textdomain' )
), 'activity' );
}
add_action( 'bp_actions', 'bp_rename_profile_tabs' );
if ( ! is_admin() ) {
wp_dequeue_styles( 'cmb2-styles' );
}
// or this?
apply_filters( 'cmb2_enqueue_css', false );
/**
* Register new subnav tabs for BP 'Profile'
*
* @author Damon Cook
*/
function wds_ye_add_profile_tabs() {
global $bp;
// Define new subnav items.
$subnav_items = array(
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
@colorful-tones
colorful-tones / class-custom-vc-element.php
Last active January 12, 2017 21:23
Example of using the `vc_shortcodes_css_class` to streamline VC's class name output on parent elements. See line #53 `add_filter()` and the `filter_vc_row_class()` function on line 73.
<?php
/**
* WDS Visual Composer Custom Element
*
* @since NEXT
* @package WDS Visual Composer
*/
/**
* WDS Visual Composer Custom Element

Keybase proof

I hereby claim:

  • I am colorful-tones on github.
  • I am damoncook (https://keybase.io/damoncook) on keybase.
  • I have a public key whose fingerprint is EF50 20E2 E053 ADE5 7973 5249 4537 9BB4 BE93 4BE9

To claim this, I am signing this object:

/**
* This paradigm allows for horizontal scrolling on tablet and mobile.
* Mostly the horizontal scrolling is accomplished with CSS. However, we
* wanted to hide the scrollbars and do some height calculations on child
* elements. Therefore, we enhanced it with some Javascript.
*
* File horizontal-scroller.js
* @author Damon Cook
*
*/