-
-
Save nathansh/c2fc7c23d58f0b0524da to your computer and use it in GitHub Desktop.
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
vec.skipLinks = (function($){ | |
var contentID = '#main-content'; | |
$(window).on('hashchange', function() { | |
// If the new hasn is the main content ID, then set focus on it | |
if ( window.location.hash === contentID ) { | |
$(contentID).attr("tabindex",0).focus(); | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment