views:

43

answers:

3

im developing a site heavily based on jquery and involving wordpress. is there any way to navigate between pages without reloading the whole thing, other than simple hide/show functions or with hide/show how can i link to a certain part of the site?

for example if the home page is a heap of divs

<div id="1">
<p>content here</p>
</div>

<div id="2">
<p>more content here</p>
</div>

by default div 1 is shown and 2 hidden, but how could i load up the page with div 2 showing for example if someone wants to bookmark it...?

i could have a copy of the markup as a seperate file with the onload hide/show different for each one, and use the same coding file for functionaltiity..

would this work and any tips?

would it be better to build just a regular site?

+1  A: 

jQuery Ajax

gmcalab
A: 

Im not quite sure I fully understand you question, but JQuery does make it easy to use Ajax to load content from your server asynchronously. You can find documentation here.

I am not aware of any way to bookmark the state of an HTML document after it has been dynamically modified by JavaScript (except for something called session state that is lost when the window is closed), but there are ways to do bookmarking when you use Ajax.

I have never tried to bookmark with Ajax, and I am pretty sure that JQuery doesn't have this functionality built in.

I don't have never tried bookmarking with Ajax myself, but I found this article which looks very promising.

My opinion is that if the content is significant enough to merit being bookmarked, it probably needs to be built the regular way.

teh_noob
A: 

This Net Tutorial is very nice and concise as well. It allows for bookmarking and works if javascript is disabled.

fudgey
cool thanks for that, im going to build the site the way i know how (normally) because i need it up asap, but will definately be studying this and implementing on my site in the future.i like nettuts, good easy to follow tuturialscheersBen