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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:32:55+00:00 2026-06-18T19:32:55+00:00

I have been using the jQuery Docs and I am trying to set up

  • 0

I have been using the jQuery Docs and I am trying to set up a situation where the content of a modal is filled from a separate html file. All files are on the same domain, same folder. So far, the modal will launch on click, but no content is being pulled in from the html file. I’m using Zurb reveal for modal.

jQuery:

$('.video-btn').click(function (e) {
    e.preventDefault();
    var modalUrl = $(this).attr('href');
    $('#myModal').load('modalUrl #vidModal').reveal({
        animationspeed: 500,
        animation: 'fadeAndPop',
        dismissmodalclass: 'close-reveal-modal'
    });

    //$('.video-wrapper').children().show();
});

The Link

<a href="modal1.html" class="info-btn video-btn">
     <h2>Video</h2>
     <p>Cambridge at a glance</p>
</a>

/*Outer modal hidden on page*/
<div id="myModal" class="reveal-modal"></div>/*Content that is in a file named modal1.html*/
<div id="vidModal" class="reveal-modal">
    <div class="inner-modal">
        <div class="modal-head">
            <h2>Video</h2>
            <p>Cambridge at a glance</p>
            <a class="close-reveal-modal"></a>
        </div>
        <div class="modal-share-btns"></div>
        <div class="video-wrapper">
            <iframe id="vid" src="http://player.vimeo.com/video/20800836?api=1" width="700" height="400" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
        </div>
    </div>
    <!-- /inner-modal -->
</div>
  • 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-18T19:32:56+00:00Added an answer on June 18, 2026 at 7:32 pm

    your code should look like this:

    $('#myModal').load(modalUrl+ ' #vidModal')

    in your code you load the url modalUrl #vidModal and not the url stored in modalUrl concatenated with #vidModal

    (Updated base on comments)

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

Sidebar

Related Questions

I have been using jQuery prettyPhoto plugin to show inline html content. This content
I'm using the overlay jquery from here: http://flowplayer.org/tools/overlay/index.html Within my overlay I have a
Here is the jquery-ui modal code I have been using: //jQuery form dialog modal
I have been using Jquery alot lately an was wondering if I should use
I'm working on a asp.net mvc2 app. I have been using jquery to do
I have been using a jquery slideshow, but when I include a jquery newsticker
I have been using (and loving ) the jQuery intellisense for Visual Studio 2008
I've been using jquery on and off for the last 6 months. I have
I have been using mootools for a year now. I need to use jquery
I have been using jquery validate plugin http://bassistance.de/jquery-plugins/jquery-plugin-validation/ . It has been working successfully,

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.