Yusaf Khaliq Yusaf Khaliq - 28 days ago 10
jQuery Question

jquery select iframe with youtube embed src

If i want to select all youtube iframes via their src how can this be achieved, i have tried the jquery below but it won't work?
the embed src is

http://www.youtube.com/embed/videoid?rel=0


<script>
$('iframe[src="http://youtube.com/embed/"]')
</script>

Answer Source

You need to write src^="..." to find <iframe>s with src that starts with ....