Last active
March 6, 2017 01:28
-
-
Save graylaurenm/7298a9eb73951a3362dca9acc1a75dd6 to your computer and use it in GitHub Desktop.
Zip Recipes "jump to recipe" starter
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
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
var jumpID = $( '.zlrecipe-container-border' ).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