Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@graylaurenm
Last active March 6, 2017 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graylaurenm/b5094543f75be9b6b97b to your computer and use it in GitHub Desktop.
Save graylaurenm/b5094543f75be9b6b97b to your computer and use it in GitHub Desktop.
EasyRecipe "jump to recipe" starter
<script type="text/javascript">
(function($) {
$(function() {
var jumpID = $( '.easyrecipe' ).attr( 'id' );
if( jumpID ) {
$( 'body' ).addClass( 'skipLink' );
$( '.content .entry-header' ).append( '<a href="#' + jumpID + '" class="skip">Skip to Recipe</a>' );
}
});
})(jQuery);
</script>
<style type="text/css">
.skipLink .content .entry-header a.skip {
display: block;
font-size: 11px;
float: right;
height: 56px;
width: 45px;
background: #222;
color: #fff;
padding: 5px;
line-height: 15px;
vertical-align: middle;
text-align: center;
text-transform: lowercase;
margin: 0 0 10px 10px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment