Last active
August 29, 2015 14:05
-
-
Save srikat/0072b69608ab007482b3 to your computer and use it in GitHub Desktop.
Medium-like fluid lightbox in WordPress using Fluidbox. http://sridharkatakam.com/medium-like-fluid-lightbox-wordpress-using-fluidbox/
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
jQuery(function( $ ){ | |
$('a.fluidbox').fluidbox(); | |
}); |
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
<?php | |
//* Do NOT include the opening php tag | |
//* Enqueue Fluidbox | |
add_action( 'wp_enqueue_scripts', 'enqueue_fluidbox' ); | |
function enqueue_fluidbox() { | |
wp_enqueue_style( 'fluidbox-css', get_bloginfo( 'stylesheet_directory' ) . '/css/fluidbox.css', array(), CHILD_THEME_VERSION ); | |
wp_enqueue_script( 'fluidbox', get_bloginfo( 'stylesheet_directory' ) . '/js/jquery.fluidbox.min.js', array( 'jquery' ), '1.0.0' ); | |
wp_enqueue_script( 'fluidbox-init', get_stylesheet_directory_uri() . '/js/fluidbox-init.js', array( 'fluidbox' ), '1.0.0', true ); | |
} |
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
<a href="http://genesis.dev/wp-content/uploads/2014/04/88H.jpg" class="fluidbox"><img src="http://genesis.dev/wp-content/uploads/2014/04/88H-300x107.jpg" alt="88H" width="300" height="107" class="aligncenter size-medium wp-image-1540" /></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment