Avatar of Robert Granlund
Robert Granlund
Flag for United States of America asked on

jQuery to cross fade between 2 pages

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?

Avatar of undefined
Last Comment
Julian Hansen

8/22/2022 - Mon
Chris Stanyon

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.
Robert Granlund

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?
Chris Stanyon

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).
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Julian Hansen

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question