Skip to content

Instantly share code, notes, and snippets.

@PlanBrewski
Last active December 26, 2015 19:29
Show Gist options
  • Save PlanBrewski/7201515 to your computer and use it in GitHub Desktop.
Save PlanBrewski/7201515 to your computer and use it in GitHub Desktop.
Example of loading Bootstrap JS in wordpress.
function register_bootstrap_js() {
wp_register_script('bootstrap_js', '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js', 'jquery');
wp_enqueue_script('bootstrap_js');
}
add_action( 'init', ' register_bootstrap_js' );
<script type="text/javascript">
(function($) {
$("[rel='tooltip']").tooltip();
$('#hover-cap-4col .thumbnail').hover(
function(){
$(this).find('.caption').slideDown(250); //.fadeIn(250)
},
function(){
$(this).find('.caption').slideUp(250); //.fadeOut(205)
}
);
})(jQuery);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment