Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/8782031 to your computer and use it in GitHub Desktop.
Save srikat/8782031 to your computer and use it in GitHub Desktop.
Making YouTube videos responsive when using Dynamik. http://sridharkatakam.com/making-youtube-videos-responsive-using-dynamik/
//* Enqueue FitVids
add_action( 'wp_enqueue_scripts', 'enqueue_fitvids' );
function enqueue_fitvids() {
wp_enqueue_script( 'fitvids', get_bloginfo('url') . '/wp-content/js/jquery.fitvids.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'fitvids-init', get_bloginfo('url') . '/wp-content/js/jquery.fitvids.init.js', array( 'fitvids' ), '1.0.0', true );
}
jQuery(document).ready(function($) {
$(".site-container").fitVids();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment