Created
October 12, 2016 16:16
-
-
Save d4mation/a40c101fa9e226dff80e928026ac11a5 to your computer and use it in GitHub Desktop.
Zurb's Foundations Magellan feature doesn't have a way to update the URL Hash without altering the History
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
/* | |
* Zurb's Foundations Magellan feature doesn't have a way to update the URL Hash without also altering the History | |
* | |
* http://foundation.zurb.com/sites/docs/magellan.html#js-options | |
*/ | |
( function( $ ) { | |
$( '.magellan' ).on( 'update.zf.magellan', function( event, activeElement ) { | |
// Updates the Hash in the URL without altering the History | |
history.replaceState( undefined, undefined, activeElement[0].hash ); | |
} ); | |
} )( jQuery ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment