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

  • Home
  • SEARCH
  • 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 8379173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:06:23+00:00 2026-06-09T16:06:23+00:00

Trying to add a border to the thumbnail video that’s playing in the iframe.

  • 0

Trying to add a border to the thumbnail video that’s playing in the iframe.

$('document').ready(function(){

    $("#video-thumbs li").click(function(e){
        e.preventDefault();
        $("#video-thumbs li").addClass("current").not(this).removeClass("current");
      });

});
<iframe width="1020" height="574" id="myvideo" src="http://www.youtube.com/embed/Qdse1SEBimw" frameborder="0" allowfullscreen=""></iframe>
<ul id="video-thumbs">
    <li class="current" style="margin-left: 0;">
    <div id="playbtn" onclick="document.getElementById('myvideo').src='http://www.youtube.com/embed/Qdse1SEBimw'"></div>
    <img src="files/lamb.png" width="326" height="181">
    </li>
    <li>
    <div id="playbtn" onclick="document.getElementById('myvideo').src='http://www.youtube.com/embed/WZknytdWWhI'"></div>
    <img src="files/tuna.png" style="width: 326px">
    </li>
    <li style="margin: 0 0 0 11px">
    <div id="playbtn" onclick="document.getElementById('myvideo').src='http://www.youtube.com/embed/BAembvTjChs'"></div>
    <img src="files/myers.png" width="326" height="181">
    </li>
</ul>
  • 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-06-09T16:06:25+00:00Added an answer on June 9, 2026 at 4:06 pm

    Try structuring the HTML differently, and remove those unsigthly onclick functions :

    <iframe width="1020" height="574" id="myvideo" src="http://www.youtube.com/embed/Qdse1SEBimw" frameborder="0" allowfullscreen=""></iframe>
    <ul id="video-thumbs">
        <li style="margin-left: 0;">
            <div class="playbtn" data-url='http://www.youtube.com/embed/Qdse1SEBimw'></div>
            <img src="files/lamb.png" width="326" height="181" class="current">
        </li>
        <li>
            <div class="playbtn" data-url='http://www.youtube.com/embed/WZknytdWWhI'></div>
            <img src="files/tuna.png" style="width: 326px">
        </li>
        <li style="margin: 0 0 0 11px">
            <div class="playbtn" data-url='http://www.youtube.com/embed/BAembvTjChs'></div>
            <img src="files/myers.png" width="326" height="181">
        </li>
    </ul>​​​​​​​​​
    

    Now do some jQuery stuff :

    $(function(){
        $("#video-thumbs li").on('click', function(){
            $(this).find('img').addClass("current").end()
                   .siblings().find('img').removeClass("current");
            $("#myvideo").prop('src', $(this).find('div').data('url'));
        });
    });​
    

    And it should work fine ?
    Here’s a FIDDLE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to add thumbnail to list view but the problem is that
Trying to add rounded corners to images, that also have a border. Came up
I am trying to add a curved border around an image downloaded and to
I'm trying to add a bottom border to a title thats wrapped within a
I am trying to add a border and padding to the table row of
I am trying to add a bottom border to a div .divLast { top:
I'm trying to add 3 panels to the border layout only North South and
I am trying to add a border around an Image Map Areas. Here is
I'm trying to add an icon which sits on top of the border, splitting
I am trying to figure out how to add a border only inside the

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.