Quantcast
Channel: DokuWiki
Viewing all articles
Browse latest Browse all 25296

tips:copy_section_link - [An improved version of the script]

$
0
0
1477014833current
Line 62:Line 62:
 In that case ''$this.attr('id')'' wouldn't find ''id'' in a header. For that I added ''if (!anchorId) anchorId = this.childNodes[0].id;''. In that case ''$this.attr('id')'' wouldn't find ''id'' in a header. For that I added ''if (!anchorId) anchorId = this.childNodes[0].id;''.
  
-The resulting script is here. It gives Javascript errors in some browsers, so could anyone help to debug it?+The resulting script is here:
  
 <code javascript ./conf/userscript.js> <code javascript ./conf/userscript.js>

Viewing all articles
Browse latest Browse all 25296