Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Emmanouil Koumortzis
2,888 Pointslinks between my pages
I want to my page change only the main content when i choose a link from nav bar..where i learn this..?

Jeremy Germenis
29,854 Pointsor go old skool with some frames!

James Barnett
39,199 Points>
or go old skool with some frames!
<frame>
and related elements were removed in HTML5 because using them damages usability and accessibility
1 Answer

James Barnett
39,199 PointsYou need to know basic JavaScript & JQuery, no AJAX necessary.
$(document).ready(function(){
$("li").click( function() {
var classClicked = $(this).attr('class');
$(".content div").removeClass( "show" );
$(".content-" + classClicked).addClass("show");
});
});
I made you a demo

Adam Sackfield
Pro Student 19,663 PointsNice advice, but still AJAX would be better than all the content in a single HTML page

James Barnett
39,199 PointsAdam Sackfield - Where would the content live if not in the page. Database? JSON? PHP files?

Adam Sackfield
Pro Student 19,663 PointsJSON on the server!
Adam Sackfield
Pro Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsTry looking at the videos on here for a start. Maybe AJAX but your question is sparse in details to say the least!