Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6778067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:13:23+00:00 2026-05-26T16:13:23+00:00

If a YouTube iframe html is <iframe width=560 height=315 src=http://www.youtube.com/embed/VIDEOID frameborder=0 allowfullscreen></iframe> The jquery

  • 0

If a YouTube iframe html is

<iframe width="560" height="315" src="http://www.youtube.com/embed/VIDEOID" frameborder="0" allowfullscreen></iframe>

The jquery should test the iframe src to see if the first 29 characters match http://www.youtube.com/embed/

if it does apply a jquery to extract the VIDEOID after /embed/ and replace the iframe src with http://www.redirect.mysite.com/?id=VIDEOID

so the iframe’s src below

<iframe width="560" height="315" src="http://www.youtube.com/embed/EhrYQrLBiTQ" frameborder="0" allowfullscreen></iframe>

should be replace with

<iframe width="560" height="315" src="http://www.redirect.mysite.com/?id=EhrYQrLBiTQ" frameborder="0" allowfullscreen></iframe>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:13:23+00:00Added an answer on May 26, 2026 at 4:13 pm

    See this fiddle: http://jsfiddle.net/maniator/cRFgv/

    Code:

    $('iframe').each(function(){
        this.src = this.src.replace('http://www.youtube.com/embed/', 
                                             'http://www.redirect.mysite.com/?id=');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I were to embed a YouTube video for example <iframe width=560 src=http://www.youtube.com/embed/25LBTSUEU0A class=player
The youtube embed code's general structure is like this: <iframe width=560 height=349 src=http://www.youtube.com/embed/MiYND_zvIc0 frameborder=0
<iframe class=youtube-player type=text/html src=http://www.youtube.com/embed/JW5meKfy3fY?wmode=opaque&autohide=1&autoplay=1&volume=0&vol=0&mute=1 frameborder=0>&lt;br /&gt;</iframe> The video isn't muted! I want volume to
I have this piece of HTML: <div class=embed> <iframe width=300 height=200 frameborder=0 allowfullscreen= src=http://www.youtube.com/embed/123456></iframe>
I have this youtube code: <iframe width=970 height=582 src=EMBED CODE FROM YOUTUBE frameborder=0 allowfullscreen></iframe>
I have a youtube video embed code that looks like this: <iframe width=560 height=315
Here is my HTML: <a class=video iframe href=http://www.youtube.com/watch?v=Psk2Pq03rv0&#38;fs=1>Arbitrary text</a> Here is the Fancybox javascript:
if there's a html like the following <div class=comment> [youtube]http://www.youtube.com/watch?v=videoid1[/youtube] random text </div> <div
YouTube has URL's like these: http://www.youtube.com/watch?v=zKqeCtjFGFc When I create a PHP page mine would
http://www.youtube.com/ You see the search buttoN. it's really nice.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.