Skip to content

Instantly share code, notes, and snippets.

View jbuncle's full-sized avatar

James Buncle jbuncle

View GitHub Profile
@jbuncle
jbuncle / jquery.viewport.js
Last active January 25, 2017 19:59
2 jQuery Plugins for detecting if an element is in the current viewport (visible from the current scroll positions).
/*!
* 2 jQuery Plugins for detecting if an element is in the current viewport (visible from the current scroll positions).
*
* $.isWithinViewport - for detecting if the element is fully in view
* $.inViewport - for detecting if the element is partially in view
*
* Copyright 2016 James Buncle
*
* Released under the MIT license.
* http://jquery.org/license
@jbuncle
jbuncle / jquery.scale-text.js
Last active May 19, 2016 10:47
jQuery Plugin for responsively scaling text to fill it's parent width.
/*!
* jQuery Plugin for responsively scaling text to fill it's parent width.
*
* Copyright 2016 James Buncle
*
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function ($) {
@jbuncle
jbuncle / bootstrap-nav-scroll-hider.js
Last active November 7, 2025 19:53
jQuery script to hide bootstrap fixed navbar on scroll down and reveal on scroll up
/*!
* jQuery script to hide bootstrap fixed navbar on scroll down and reveal on scroll up.
*
* Copyright 2016 James Buncle
*
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function ($) {
@jbuncle
jbuncle / jquery.smallcaps.js
Last active May 22, 2016 15:41
jQuery Plugin to apply a 'smallcaps' effect to text
/*!
* jQuery SmallCaps
*
* Demo: https://jsfiddle.net/jbuncle/9wwrkbrf/
*
* Copyright 2013 James Buncle
*
* Released under the MIT license.
* http://jquery.org/license
*
@jbuncle
jbuncle / jquery.toggle-attribute.js
Created November 26, 2015 23:32
jQuery Plugin to toggle an elements attribute
/*!
* jQuery Toggle Attribute
*
* Copyright 2013 James Buncle
*
* Released under the MIT license.
* http://jquery.org/license
*
*/
(function($) {