The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › JQuery – need to target iframe with src=”vimeo”
How would I target iframe with a particular src?
So far I have…
$("iframe").each(function() {
Thanks
This should do it:
var ret = []; $("iframe").each(function() { var $this = $(this); if ($this.attr('src').match(/vimeo.com/ig)) ret.push($this); });
$('iframe[src*="vimeo.com"]');
That’s great. Job done. I’m new to this, but having seen the tutorial on attribute selectors a couple of weeks ago that makes sense