... note that in my TiggerScript article ( http://www.michaelpundit.com/tech/TiggerScript.htm ) ...
Just a minor quibble - there seem to be some proprietary HTML attributes on this page, which upsets HTML validators: ------------------------------ line 52 column 1 - Warning: <body> proprietary attribute "attranchornametopleveltoc" line 52 column 1 - Warning: <body> proprietary attribute "attrnumsections" line 67 column 1 - Warning: <div> proprietary attribute "attristoc" line 112 column 1 - Warning: <div> proprietary attribute "attridtoc" line 112 column 1 - Warning: <div> proprietary attribute "attridhlinktoc" ------------------------------
... and the http://www.michaelpundit.com/tech/TiggerScript.js script seems to rely on these: ------------------------------ //these are names of attributes that should be used for mark up of html document var ATTR_NUM_SECTIONS_IN_DOCUMENT = "attrNumSections"; var ATTR_ANCHOR_NAME_TOP_LEVEL_TOC = "attrAnchorNameTopLevelTOC"; var ATTR_ID_MATCHING_TOC = "attrIdTOC"; var ATTR_ID_MATCHING_HLINK_TOC = "attrIdHlinkTOC"; var ATTR_IS_DIV_TOC = "attrIsTOC"; ...... //correct number should be set as custom attribute to BODY element var numSections = document.body.getAttribute(ATTR_NUM_SECTIONS_IN_DOCUMENT); ------------------------------
... and I'm not entirely convinced that unilaterally making up new HTML attributes is the best approach.
Mark's suggestion of a custom User.js script is probably the way to go, if possible - that way it has to work with standard HTML, without requiring backend changes, and people who want it can enable it, and those who don't aren't affected - all of which are good things.
-- All the best, Nick.