I’m using php to develop an application, and I’m using something like this to change the pages
<?php
if (!isset($_GET["p"])){
$p = 'home';
} else{
$p = $_GET["p"];
}
include "$p.php";
?>
What I want to know is if there is a way to put some effects with JQuery when I change the page
Something like a loading icon or anything that makes the browser not to display that white page when going from a page to another, can you understand what I want?
At first I was using hidden divs and show/hide, but that usually made the JQuery effects
within this divs get all messed up, so i changed to php include.
What I need is that people won’t feel like leaving on page to reach another, I want them to feel like they’re just changing the contents .
If you are just making a link to each page, I don’t think its possible.
What you can do is make page change by ajax. Something like this:
Where the link to home has
id="home"and replace$("#content").html(pageHtml);with an effect.