Reputation: 36703
I have a web application which has 8 tabs on the menu. When I click on one tab the current content fades out and the content specific to tab comes up.
This thing is working all fine but the application is pretty slow as the fadeIn and fadeOut is being done on very large html (maybe around ~2000 lines/tab of ) content which is inturn making the whole application slower.
What can I do to make it snappy and smooth.
Here are some doubtful points I have...
Can I load the tab content via AJAX instead of loading all of them in one go?
If I load them via AJAX for ex of Tab A and then user clicks on Tab B, should I remove Tab A content from the DOM and reload it on click of Tab A Again or should I keep it in the DOM.
What will happen to the click handlers as I need to do dynamic event binding in that case.
What else can be done in order to enhance the performance?
Thanks a lot!
Upvotes: 1
Views: 407
Reputation: 888
Well, we had that kind a problem, where we have around 10 tabs and need to load data. The doubts you are having is already turned to solution. I ll define wat we have done to accomplish the task with more smooth and perfect result
From my standpoint , there are some observations. I can think if to enhance the performance of the application.
From my experience, these are the things I learned and implement when working with web application to improve the performance of the application.
Upvotes: 1