[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [html-export question] location with JS.
From: |
Rasmus |
Subject: |
Re: [O] [html-export question] location with JS. |
Date: |
Wed, 17 Dec 2014 16:01:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hi Christian,
Thanks for the insightful comments. Javascript is an interesting domain;
totally foreign to me, though.
Christian Moe <address@hidden> writes:
> (except when the window becomes seriously too small,
> and the year jumps up on top of the other one, but that, I think, has to
> be expected).
This is what I'm trying to get rid of, somehow... In my full document it
seemed to jump around much more. . .
I think I got it working now by rerunning the script on resize and cloning
the node rather than modifying the original node. I have no idea if this
is bad. It works wonderfully in the newest Firefox and Gnome Web.
> A different problem is that the script only picks out every other
> bol-year DIV, as you will soon see if you add more entries with boxes on
> the left. The reason is that getElementsByClassName returns a live
> HTMLCollection that updates according to the document order of the
> elements even as the script changes that order.
Interesting.
> To loop through them, try simply
>
> var e = elements[0]; // instead of var e = elements[i];
Thanks this is very helpful.
Next step: Proper small caps and make it work well on my phone!
Thanks,
Rasmus
--
And I faced endless streams of vendor-approved Ikea furniture. . .
test.org
Description: Lotus Organizer