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');
});
}