I just finished creating a one-page application using the Yii Framework for PHP and JQuery (JQuery UI as well).
What I learned is that jQuery is not adequate enough to work with a true one-page application.
What you need to use is a library that handles a lot of problems that arise when creating a SPA and frees you from having to do a lot of manipulations with the DOM.
Instead, you actually write a true application and let the library handle these aspects for you.
One library that comes to mind is AngularJS.
It can also be very helpful.
http://addyosmani.com/blog/building-spas-jquerys-best-friends/
Hope this helps.
source share