We help IT Professionals succeed at work.

jQuery to cross fade between 2 pages

Robert Granlund
Last Modified: 2019-04-09
Using jQuery, is there a way to cross fade two pages?  Meaning if I go from page 1 to page 2 they cross fade to the next instead of an abrupt change?  Is there an example?
Watch Question

Most Valuable Expert 2018
Distinguished Expert 2019

AFAIK that's not possible with the standard request / response. You could potentially do it if you have a single page website, in which case you never switch pages - you just load different content into the same page, but I can't imagine it being a particularly smooth operation.


What the deal is, I have two forms on a page (Code Ignitor)  And they both won't work.  If there is code to open and close a form, the second for won't open its open and code close. How can you get two open and close form tags to work in CI?  The reason I ask about the code fade is because that is the animation on the page. It fades from one section to another.  

I also noticed that the tag does appear if I change the url to the correct method in the controller. So maybe a better question is, how do I change the url (add to it) without changing the page?
Most Valuable Expert 2018
Distinguished Expert 2019

Not entirely sure what you're after, and don't really understand what you mean by open and close a form.

You can have as many forms on a page as necessary, and the easiest way to deal with them may be to hook them up to an AJAX request. This way, each form can be posted without ever have to leave the page.

Just because you're using CodeIgniter shouldn't make a difference - CodeIgniter views are just html pages with some added functionality (you can use the built-in form helper is you want).
Most Valuable Expert 2017
Distinguished Expert 2019
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions