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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:47:19+00:00 2026-06-12T05:47:19+00:00

I have 2 divs that need to show hide. One with images, one with

  • 0

I have 2 divs that need to show hide. One with images, one with youtube video.

<div class="gallery-video-wrapper">
     <iframe id="player" type="text/html" width="430" height="323" src="http://www.youtube.com/embed/u1zgFlCw8Aw?enablejsapi=1" frameborder="0"></iframe>
</div>
<div class="gallery-images">
    <img src="image1.jpg" />
rest of the jquery gallery code...
</div>

By default only the video is shown. On click on

<a href="#" class="show-gallery">Show Images</a>

I want to show the gallery which i managed to do. But if the video is played i cant seem to stop it unless i remove the whole div. and if do that i don’t know how to put it back.

This is the script i have so far:

$('.show-gallery').click(stop, function() {

        $('.gallery-video-wrapper').fadeOut();
        $('.gallery-images').fadeIn(function() {
            $('.ad-gallery').adGallery({
                display_back_and_forward : true,
                display_next_and_prev : true,
                update_window_hash : false,
                scroll_jump : 0,
                thumb_opacity : 1
            });
        });
    });

Any ideas how to solve this?

  • 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-12T05:47:20+00:00Added an answer on June 12, 2026 at 5:47 am

    But if the video is played i cant seem to stop it unless i remove the
    whole div. and if do that i don’t know how to put it back.

    have you tried using .detach() instead of .remove()?

    The .detach() method is the same as .remove(), except that .detach()
    keeps all jQuery data associated with the removed elements. This
    method is useful when removed elements are to be reinserted into the
    DOM at a later time.

    you can also try to .hide() the div, and .show() it later

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

Sidebar

Related Questions

I have some DIVs that I am using JQuery to hide and show using
I have several divs that share a common class. If one of these divs
I have this need to show and hide a div if a checkbox is
I have 2 div's that I need consecutively toggled back and forth showing and
i have three divs like that: <div id=1 >id=1</div> <div id=2>id=2</div> <div id=3>id=3</div> Now
I have a menu and three hidden divs that show up depending on what
I have 2 divs in an HTML page -that need refreshing when an event
I have a very basic hide/show div function set up for when people click
I have a little web app in which I show and hide DIVs a
I have a form that generates divs. I need to add information below 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.