jabbett posts
Dreamhost, .htaccess, and statsIf you host your site on Dreamhost, the default Frog .htaccess file prevents you from accessing your site’s stats directory, i.e. yourdomain.com/stats Regain access to the directory by adding this snippet just before Frog’s <IfModule mod_rewrite.c> line: |
Dynamic in-page navigationI wanted in-page navigation similar to what you see on Wikipedia: each HTML heading gets an anchor name, and a link to each appears at the top of the page. I pieced together a script with JQuery 1.3.2 that pulls out heading tags (h3 and h4, in my case), generates a slug from the heading text, wraps each heading with an anchor, and generates a menu to insert in an element with ID “menu”.
I didn’t try to created nested lists for the different header levels; instead, each list element has a class (e.g. class=“h3”) that can be styled appropriately (e.g. margin-left:2em) Here’s an example of the script in action. |