Indexable AJAX Content

Faux AJAX

Rather than use AJAX to load in separate .html files, this approach will dynamically hide all the DIV’s you link to from the specified navigation, and show them individually when you click. This will give the effect of having AJAX driven content without actually loading in a separate file. This allows your hidden content to be out of sight from users, but not from search engines.

See Example

This has approach is by no means a new one. The beauty of this small script is that it is very modular and able to accommodate any number of show / hides scenarios simple by adding a few CSS classes into your markup.

Usage

To use this approach simply include the following code snippet after including the jQuery library. If you like you can link to the Google hosted copy of jQuery as I did in the example.

  • Add a class of ajax to the container of your links
  • Inside the href attribute of your anchor, put the ID of the div you want to show, for example href=”#one”
  • Add class=”default” onto any links that you want to be shown by default (on page load).
  • When a link is clicked class=”current” will be added to that link. This will allow you to highlight the current selection.
  • Share/Bookmark

Comments

No comments have been added yet.

Leave a Reply

show allowed tags

XHTML: You can use these tags if you promise to play nice: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

By submitting a comment here you grant Fresh Tilled Soil a perpetual license to reproduce your words and name/web site in attribution. Inappropriate comments will be removed at admin's discretion.

Twitter Updates

@freshtilledsoil is talking about...

Latest from the Blog

    How a Redesign Reduced Our Bounce Rates by 45%

  • We recently updated our own home page design with some very positive results. As you can see below the redesign wasn’t significantly different but there were some key improvements. Our goal with this redesign was to reduce the “drop-off” or bounce rate from the site. From the Google Analytics charts…

    • Share/Bookmark

Let's Talk

VP of Business Development, Dan AllardHi, I'm Dan and I'd love to hear from you to explore the possibilities of your project.

Get Started q

Connect with us

Follow FreshTilledSoil on Facebook! View photos from FreshTilledSoil's Photostream Visit FreshTilledSoil's LinkedIn page Read FreshTilledSoil's tweets