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 7444663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:33:43+00:00 2026-05-29T11:33:43+00:00

How do I make a video remain hidden until a thumbnail that opens a

  • 0

How do I make a video remain hidden until a thumbnail that opens a lightbox is clicked?

Check at this page. (Disregard the video on top.)

You can see an image with a link for opening video object in lightbox and the said video just below the image.

I want to be able to see only the image.

I tried setting video player’s visibility to hidden but then it remains hidden even after I click the image link.

This is the code:

<a href="?lightbox[width]=320&lightbox[height]=240#mediaspace" class="lightbox"><img width="160" height="120" alt="Video" title="Video" src="http://i.ytimg.com/vi/8UVNT5wvIGY/0.jpg"/></a>

<script type='text/javascript' src='jwplayer.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://player.longtailvideo.com/player.swf',
'file': 'http://www.youtube.com/watch?v=YE7VzlLtp-4',
'controlbar': 'bottom',
'width': '470',
'height': '320'
});
</script>

Thanks.

UPDATE:

OK, I figured what I have to do. I need a script that toggles between two divs.
Let me explain. I should have my code look something like this:

<a href="#player" class="lightbox"><img src="/images/image.jpg" alt=""></a>

<div class="hidden" style="display: none;">
    <div id="player" class="content">
        VIDEO EMBED CODE
    </div>
</div>

but I need a script that would work like this:

  1. First a page looks like this – I see only the image (that is a link) and you can’t see the player because it is wrapped with div class=”hidden”.

  2. I click the image and a lightbox opens and displays a div that has an id=”player” and is class=”content” which means that the script I need would have to toggle between “displaying” (or better say not displaying) the div with class=”hidden” when the lightbox is not open and displaying the div with class=”content” when the lightbox is open.

I’m sure that’s what I need but have no idea how to write that script. You can see that toggle implemented in JWbox here.

Thanks!

  • 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-29T11:33:46+00:00Added an answer on May 29, 2026 at 11:33 am

    You need to write a short javascript to hide/unhide the divs.

    Are you using jQuery? If not, you should.

    Make sure jQuery is loaded:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    

    and then use a script something like this:

    <script type="text/javascript">
    
        $(document).ready(function(){
    
           $("#player").click(function(event){
               $("#myHiddenDiv").removeClass("hidden");
                // OR THIS: $("#myHiddenDiv").css("display", "inline");
           });
    
        });
    
    </script>
    

    This way the #myHiddenDiv (You need a way to reference the exact div) will be visible when the user clicks the #player-div.

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

Sidebar

Related Questions

I'd like to make a video tutorial for my SDK--one of those videos that
I tried to make an accordion effect with JavaScript based off this video altering
Is there a gem or a technology that can make live video streaming via
I have two buttons on a page that trigger two functions that make two
I'm hoping to make an app that streams live video that has a view
So, I'm watching this video http://www.youtube.com/watch?v=N6YdwzAvwOA and Romain Guy is showing how to make
I have this sample code, that works: <video src=./ellen.ogv width=320 height=240 type='video/ogg; codecs=theora, vorbis'
I want to make some GUI mockup program for video player, so my idea
I would like to make a program to capture video. What is the best
My company runs a video website. We currently make our content available via streaming,

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.