Last active
March 6, 2017 01:28
-
-
Save graylaurenm/074e02cb59410915572e417da967d4b1 to your computer and use it in GitHub Desktop.
Meal Planner Pro "jump to recipe" starter
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
<script type="text/javascript"> | |
(function($) { | |
$(function() { | |
var jumpID = $( '.mpprecipe-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