Created
February 15, 2018 11:10
-
-
Save zgordon/09bad54144361a76c46c90f5e309edc4 to your computer and use it in GitHub Desktop.
This is an example of how you could use fitvid and swipebox to add additional functionality to default video and gallery blocks in WordPress.
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(document).ready(function(){ | |
// Make YouTube video blocks responsive | |
jQuery(".wp-block-embed-youtube").fitVids(); | |
// Add lightboxes to gallery blocks linking to media file | |
jQuery(".blocks-gallery-item a").swipebox(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment