Tag: JavaScript

Dynamic Breadcrumbs with JavaScript, Revision 4

Updates from Revision 3:

  • Document title text can also be replaced by text in the replaceTheseCharacters array
  • Check for the presence of the tag to attach to before attempting to attach to it (lots of ‘t’s in that one)
  • Added a little bit more documentation to the top

Continue reading …

Dynamic Breadcrumbs with JavaScript, Revision 3

And here they are again. This time I’m using an unobtrusive, object-oriented approach. The same customizations apply. The major difference between this version and the others is that you no longer need to add any script tags to the body of your web page.

Continue reading …

Dynamic Breadcrumbs with JavaScript, Revision 2

What a difference a few years makes. The new script is much cleaner than the old one. The source with comments is below. Below that is the source without comments. Below that is the source without comments or the character replacement feature. With a few modifications you could whittle it down even further to fit only the parts you need for your site. I hope you find it useful.

Continue reading …

Dynamic Breadcrumbs with JavaScript

Note: This script has been updated. You are free, of course, to use any version.

Update 11/6/2007: In updating WordPress I have apparently borked the display of the code. It is in such disrepair that I can’t remember how to put it back together. Given that this is outdated code (and now broken) and given that I have no intention of rewriting it in its original state, I don’t recommend using it.

I wrote this in 2002. I think this was the first time I used JavaScript to solve a real problem. It works well and it’s still in use on a few web sites, including HealthLinks, the site I currently work on at UW. I plan to refactor and publish an updated version soon. For now, feel free to try it out.

Continue reading …