Have at look at this thread
https://groups.google.com/forum/#!msg/tiddlywiki/NwOI-QER2ig/lSLS3XolwDoJ
all the best
BJ
On Thursday, October 5, 2017 at 4:32:16 AM UTC+1, K wrote:
>
> Ok, Ive written a function...
> Where do I put it?
>
>
> function appendH3() {
> var my_elem = document.getElementsByTagName(h3);
>
> var appender1 = document.createElement(a);
> appender1.href = "#tw-href000";
> appender1.style.float='right';
> appender1.textContent = '[Top]';
>
> my_elem.parentNode.insertBefore(appender1, my_elem);
> }
>
> ---
>
> The above function didnt work due to me having no knowledge in javascript.
>
> After fiddling around, I managed to create a correct script, but I still
> don't know where to put it....
>
> function appendH3() {
> var a = document.createElement('a');
> a.appendChild(linkText);
> a.href = "#tw-href000";
> a.style.float = "right";
> var linkText = document.createTextNode("[Top]");
> var x = document.querySelectorAll("h3");
> var arr = [];
>
> for(var i = x.length; i--; arr.unshift(x[i]));
> for (var i = arr.length - 1; i >= 0; i -= 1) {
> var clone = a.cloneNode(true);
> arr[i].appendChild(clone);
> }
> }
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/4eb611ae-910e-4f6d-816a-8563c73711d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.