From 2013.igem.org
(Difference between revisions)
|
|
Line 99: |
Line 99: |
| $('#toc').followTo(431); | | $('#toc').followTo(431); |
| }); | | }); |
- | window.onload = function()
| |
- | {
| |
- | var $links=$('.#toc a');
| |
- |
| |
- | $links.each(function(){
| |
- | var href=$(this).attr('href');
| |
- | /* find corresponding anchor */
| |
- | var matchAnchor= $('[id="'+href+'"]');
| |
- | /* remove all special chars */
| |
- | href=href.replace(/\W/g,'dot');
| |
- | /* replace link href*/
| |
- | $(this).attr('href', '#'+href);
| |
- |
| |
- | /* replace anchor id*/
| |
- | matchAnchor.attr('id', href);
| |
- |
| |
- | });
| |
- | };
| |
| </script> | | </script> |
Revision as of 17:26, 31 August 2013