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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:35:20+00:00 2026-06-05T02:35:20+00:00

I am working on a iPad HTML app that has two videos in it.

  • 0

I am working on a iPad HTML app that has two videos in it. The HTML code is loaded dynamically. The page has two videos with text corresponding to them. The videos also have just two controls. Play and Pause. However the issue I am having is the Video will only pause when the other is playing. Basically in my if / else statement the else is not being called at all. Here is my code. Anyone know why it won’t pause when trying to click on the overlay again? Thank you in advance!

$('div[class*="video-overlay"]').bind('mousedown', function() {

    var video       = $(this).next('video')[0];
    var text        = $(this).attr('data-play');

    if (video.paused) {

        video.play();

        $('p').addClass('fade');
        $('#' + text).removeClass('fade');

        $(this).removeClass('overlay');
        $('div[class*="video-overlay"]').not(this).addClass('overlay');

        $(this).children().removeClass('video-play');

        $('video').not($(this).next(el)).get(0).pause();

        $('.play').not($(this).children()).addClass('video-play');

        $(video).on('ended', function() {
            $(this).prev('div').children().addClass('video-play');
            video.pause();
        });

    } else {

        video.pause();
        console.log('Hey mom, I paused all by myself!');
    }

});
  • 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-05T02:35:22+00:00Added an answer on June 5, 2026 at 2:35 am

    It was actually in my CSS. I didn’t have the overlay in front of the video. So I changed the z-index to a higher value and the fixed it. I had the play button in front so it was playing the video, just not the overlay. Doh!

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

Sidebar

Related Questions

I'm working on the css / html for this ipad page. Here's my code:
I'm currently working on an iPad JS/HTML app, using native scrolling to view a
I am working on an iPad app (iOS 5 ARC) that will show threads
I'm working on some HTML content as part of an iPad app. We may
I'm working on a iPad app that is mainly a web view. It is
I am working on an iPad app that lets the user scroll through a
I am working on an iPad app that seems like a natural fit for
I am working on an app that uses a splitViewController that loads a html
I am working on an iPad app and the code is over 1000 lines
Working good with iPad but not iPhone Any code can I direction to iPad

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.