Forums

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”

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31951
    shavenraver
    Member

    How would I target iframe with a particular src?

    So far I have…

    $("iframe").each(function() {

    Thanks

    #56020
    Keyamoon
    Member

    This should do it:

    var ret = [];
    $("iframe").each(function() {
    var $this = $(this);
    if ($this.attr('src').match(/vimeo.com/ig))
    ret.push($this);
    });
    #55998
    jamygolden
    Member
    $('iframe[src*="vimeo.com"]');
    #55831
    shavenraver
    Member

    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

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.