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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:24:14+00:00 2026-05-25T21:24:14+00:00

I would like to load a complete HTML page into the current one using

  • 0

I would like to load a complete HTML page into the current one using standard web technologies on an iPad web app (no framework like Sencha, etc.)

I have a content page, and an article page. I want to load the article page (including javascript/CSS for this specific page) into a new div and animate the transition (sliding) but it does not seem to work.

Using jQuery load function, the CSS/JS is not perfectly loaded and it works only on Chrome (not on the iPad). Is there a better way to do so?

CSS:

#content-container {
}

#article-container {
position: absolute;
left: @defaultWidth;

width: 100%;
height: 100%;

background-color: @darkGreyColour;

-webkit-transition: left 1s ease-in; 
}

#content-container.animate {
left: -100%;
}

#article-container.animate {
    left: 0;
}

JS

function animateTransition(event) {
    $('#article-container').load('/ #main', function() {
        console.log("Animating...");
        $('#content-container').addClass('animate');
        $('#article-container').addClass('animate');
    });
}
  • 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-25T21:24:15+00:00Added an answer on May 25, 2026 at 9:24 pm

    I would recommend using an <iframe> to load a full HTML page. Using jQuery’s .load() to load a portion of a full html page (ex. $("#myElement").load("/index.html #main") ) only loads the html in that portion of the document, so it won’t load the js / css that’s defined in other portions of the article page. You can read more about the issue in the ‘Loading Page Fragments’ section of jQuery’s .load API Page.

    Using an <iframe>:

    <iframe src="theArticle.html">
        <p>Your browser does not support iframes.</p>
    </iframe>
    

    Using jQuery and .load() to load the article into the <div>:

    function animateTransition(event) {
        // load the html contained in the tag with id of #main
        $('#article-container').load('myArticle.html #main', function() {
            // load the css
            $('head').load('myCSS.css', function() {
                // load the js
                $.getScript('myScript.js', function() {
                    console.log("Animating...");
                    $('#content-container').addClass('animate');
                    $('#article-container').addClass('animate');
                });
            });
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to load/refresh a particular page for every 10 secs to view
I would like to load a HTML document and modify it's text in PHP.
I have the following HTML: <div id=mydiv> </div> I would like to load content
I would like to detect when a page load request give to a UIWebView
I would like to know how to load an external Javascript into my document
I would like to be able to load data into a DataGrid in Silverlight
I'd like to inject jQuery into a page using the Google AJAX Libraries API,
I have a web service that I would like to load test by sending
I would like to load a BMP file, do some operations on it in
I would like to load a specific ConfigurationSection but the way the CLR loads

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.