Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy in newer versions of jQuery #4

Open
professordino opened this issue Nov 19, 2014 · 1 comment
Open

Buggy in newer versions of jQuery #4

professordino opened this issue Nov 19, 2014 · 1 comment

Comments

@professordino
Copy link

Chris, this is a great article; however, in post-2011 versions of jQuery, the videos do not render properly, consistently. Have you considered updating for 2014, er, 2015? Thanks!

@pr0fess0r
Copy link

I fixed this for jQuery 1.11 (and probably later). The jQuery selector was wrong:

var $allVideos = $("iframe[src^='//player.vimeo.com'], iframe[src^='//www.youtube.com'], object, embed"),

This looks for Vimeo and YouTube src parameters that start with "//" and the YouTube/Vimeo domain but if you use an asterisk this captures values that contain the YouTube/Vimeo domain:

iframe[src*='//player.vimeo.com'], iframe[src*='//www.youtube.com'], object, embed

Hope that helps someone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants