Results 1 to 5 of 5
Mar 25, 2013, 09:07 #1
jQuery selector for YouTube iframe
Does anyone know how to select a YouTube iframe with jQuery.
I am designing a player based on YouTube's js api and my plugin basically selects all of the iframes on a page and transforms then into custom YouTube players. It works ok but isn't suitable for websites that have other iframe content other than YouTube because the plugin will remove them indiscriminately and try to put the player in their place.
thanks in advance
Silversurfer"Persistence is the path to perfection"
Mar 26, 2013, 06:05 #2
- Join Date
- May 2011
- 0 Post(s)
- 0 Thread(s)
If possible try to add a code which will identified the iframe youtube content and neglect other iframe content.
var video = $(this);
var vidSrc = "";
vidSrc = video.attr('src');
}PHP Programming It’s more than just writing code
Mar 26, 2013, 12:43 #3
Thanks for your input, that's a good idea, my code actually does something similar already within the plugin but ideally I would like to select the YouTube video element before entering the plugin as in:
thanks anyway"Persistence is the path to perfection"
Mar 26, 2013, 13:11 #4
- Join Date
- Jun 2007
- 134 Post(s)
- 7 Thread(s)
Mar 26, 2013, 15:35 #5
Thanks Pullo, that's a new selector to me, great"Persistence is the path to perfection"