Created
July 8, 2013 13:09
-
-
Save motorcitymobi/5948626 to your computer and use it in GitHub Desktop.
Combining Zurb's Tooltips with the Genesis Framework.
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
<?php | |
/* | |
Template Name: Tool-Tips (Foundation) | |
*/ | |
add_action( 'genesis_after', 'mobile_do_tooltip_demo' ); | |
function mobile_do_tooltip_demo() { ?> | |
<!-- Check for Zepto support, load jQuery if necessary --> | |
<script> | |
document.write('<script src=/js/vendor/' | |
+ ('__proto__' in {} ? 'zepto' : 'jquery') | |
+ '.js><\/script>'); | |
</script> | |
<script> | |
jQuery(document).ready(function($) { | |
$(function(){ | |
$(document).foundation(); | |
}) | |
}); | |
</script> | |
<?php | |
} | |
/*** LINK TO TRIGGER TOOL-TIP ***/ | |
// <span data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!">...</span> | |
add_action( 'genesis_after', 'mobile_do_tooltip_scripts' ); | |
function mobile_do_tooltip_scripts() { | |
wp_enqueue_script( 'foundation-cloud' ); | |
wp_enqueue_script( 'tooltips-cloud' ); | |
} | |
// do genesis | |
genesis(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment