DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:copy_section_link

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tips:copy_section_link [2016-10-21 03:53]
sancaya [An improved version of the script]
tips:copy_section_link [2016-10-21 04:05] (current)
sancaya [An improved version of the script]
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>
tips/copy_section_link.txt ยท Last modified: 2016-10-21 04:05 by sancaya