Skip to content

Instantly share code, notes, and snippets.

@pagelab
Forked from Shelob9/bad.htm
Created February 12, 2014 12:15
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 pagelab/8954495 to your computer and use it in GitHub Desktop.
Save pagelab/8954495 to your computer and use it in GitHub Desktop.
<script>
document.write('<script src=/js/vendor/'
+ ('__proto__' in {} ? 'zepto' : 'jquery')
+ '.js><\/script>');
</script>
<script src="/js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
if (! function_exists('themeslug_scripts_foundation') ) :
function themeslug_scripts_foundation() {
//scripts
wp_enqueue_script('foundation-js', get_template_directory_uri().'/js/foundation.min.js', array( 'jquery' ));
wp_enqueue_script('modernizer', get_template_directory_uri().'/js/custom.modernizr.js');
//styles
wp_enqueue_style('normalize', get_template_directory_uri().'/css/normalize.css');
wp_enqueue_style('foundation-css', get_template_directory_uri().'/css/foundation.min.css');
}
add_action( 'wp_enqueue_scripts', 'themeslug_scripts_foundation' );
endif; //! themeslug_scripts_foundation exists
if (! function_exists('themeslug_js_init_foundation') ) :
function themeslug_js_init_foundation() {
echo "<script> \n
jQuery(document).ready(function($) { \n ";
echo " $(document).foundation();"
echo " }); //end no conflict wrapper \n ";
echo "</script>
";
}
add_action('wp_footer', 'themeslug_js_init_foundation');
endif; //! themeslug_js_init_foundation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment