Overclock.net banner

best code for tab transition

433 Views 5 Replies 5 Participants Last post by  glakr
Im looking for a way to prevent page reload with AJAX but im unsure what it is called. My overall goal is to allow someone to hit a tab or navigation button and it change to that page without having to reload. I would also like to figure out how to add animation to it with Jquery or JavaScript. Ideas would be great, thanks
1 - 1 of 1 Posts

· Registered
491 Posts
Question: Is all the content going to be on one page or does the content reside on different pages?

If you're loading stuff from other pages, here's an example of how to do it. There's nicer ways to do for multiple tabs, but this is the most basic way


$('#tab1').click(function() { //When tab1 gets clicked
        //Load #container from ajax/test.html into #content div
$('#content').load('ajax/test.html #container');

return false; //Prevents default click function
1 - 1 of 1 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.