Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save d4mation/a40c101fa9e226dff80e928026ac11a5 to your computer and use it in GitHub Desktop.
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
/*
* 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