Created
May 29, 2019 13:47
-
-
Save BryanBarrera/dda9c11959e05d73ce5edcddb734eca8 to your computer and use it in GitHub Desktop.
Automatically make all Youtube links open in fancybox 3 lightbox
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*='https://youtu.be/']").each(function() { | |
$(this).attr("data-fancybox",""); | |
}); | |
$("a[href*='https://www.youtube.com/watch?']").each(function() { | |
$(this).attr("data-fancybox",""); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment