This file contains 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 Toggle Attribute | |
* | |
* Copyright 2013 James Buncle | |
* | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
(function($) { |
This file contains 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 SmallCaps | |
* | |
* Demo: https://jsfiddle.net/jbuncle/9wwrkbrf/ | |
* | |
* Copyright 2013 James Buncle | |
* | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* |
This file contains 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 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 ($) { |
This file contains 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
/*! | |
* 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 |
This file contains 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 ($) { | |
$.fn.hasAttr = function (name) { | |
var currentAttr = $(this).attr(name); | |
return currentAttr !== undefined && currentAttr !== false; | |
}; | |
})(jQuery); |
This file contains 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
/*! | |
* Simple jQuery Plugin which fades out an elements siblings on hover. | |
* | |
* Copyright 2016 James Buncle | |
* | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
(function ($) { |
This file contains 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
/*! | |
* Simple jQuery Plugin for using an animated scroll to on page anchors/links. | |
* | |
* Copyright 2016 James Buncle | |
* | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* | |
*/ | |
(function ($) { |
This file contains 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
/*! | |
* Adds class to bookmark/local links when the linked element is in view. | |
* | |
* Requires https://gist.github.com/jbuncle/6f6185e88be875b2585e736a422c3f15 for detecting when element is in view. | |
* | |
* Copyright 2016 James Buncle | |
* | |
* Released under the MIT license. | |
* http://jquery.org/license | |
* |
This file contains 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
/** | |
* Basic jQuery function for handling enter key being hit. | |
* | |
* @returns jQuery | |
*/ | |
$.fn.onEnterKeypress = function (callback) { | |
return $(this).keypress(function (evt) { | |
// Check for enter key | |
if (evt.which === 13) { | |
// Invoke callback |
OlderNewer