Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #24672
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Displaying a pop-up thumbail for a list element |
| Date | 2014-06-07 21:20 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <3923520.5shgOf0Wbf@PointedEars.de> (permalink) |
| References | <f9b546ee-5875-4411-b83e-292726b5b3f8@googlegroups.com> <53933ca0$0$6672$9b4e6d93@newsspool3.arcor-online.net> <325b7f28-6969-4f49-873a-87d758b87d85@googlegroups.com> |
Dr J R Stockton wrote: > Christoph Michael Becker wrote: >> Dr J R Stockton wrote: >> > I have a little list (G&S is on the radio at the moment) of links to >> > images. I want thumbnails when I hover over part of a list element. >> > >> > hic.Elem.style.width = "10%" >> > hic.Elem.style.height = "10%" >> > >> > hic.parentNode.appendChild(hic.Elem) } >> >> As others have already pointed out, this is more a CSS related issue, >> and should be asked and discussed in a proper newsgroup. > > No; I need to use script for this. Irrelevant; you would be scripting CSS properties, if that (the stylesheet can be prepared in advance so that you only have to set the “id” or “class” attribute of the new element, if that). >> you could use something like the following to insert all img elements >> permanently (put the script element at the bottom of the body element, >> for instance). > > Being unaware of the context, you are, without realising it, apparently > making an unjustified assumption. One would not need to make assumptions if you had given sufficient context. > The number of avaiilable images is very large, and the individual images > themselves are mostly not small. Loading all of them at once would be > unreasonable. ACK. A quick test in Chromium 34 shows that resources for “img” element objects are loaded even if the elements/objects have not been inserted in the document tree, and even if the “display” style property had been set to "none" before setting the “src” property. This is probably to facilitate the corresponding events, e.g. to determine whether image data could be loaded even before trying to render it. [That you can get the Console in any tab of Chrome Dev Tools by pressing <Esc> becomes most handy here; you can focus the “Network” tab and observe the resource being loaded when you type the statements.] So go ahead, create the element objects with script once if you must; but you still need to understand CSS in order to solve your *layout* problem. And you *really* should not augment host objects. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-06 01:48 -0700
Re: Displaying a pop-up thumbail for a list element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-06 16:27 +0200
Re: Displaying a pop-up thumbail for a list element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-06 18:31 +0200
Re: Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-06 13:52 -0700
Re: Displaying a pop-up thumbail for a list element "Mel Smith" <syntel@cox.net> - 2014-06-06 15:26 -0600
Re: Displaying a pop-up thumbail for a list element dr.s.lartius@gmail.com - 2014-06-06 14:43 -0700
Re: Displaying a pop-up thumbail for a list element "Mel Smith" <syntel@cox.net> - 2014-06-06 17:08 -0600
Re: Displaying a pop-up thumbail for a list element Andrew Poulos <ap_prog@hotmail.com> - 2014-06-07 12:53 +1000
Re: Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-07 05:02 -0700
Re: Displaying a pop-up thumbail for a list element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-07 15:33 +0200
Re: Displaying a pop-up thumbail for a list element Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-07 18:24 +0200
Re: Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-07 11:01 -0700
Re: Displaying a pop-up thumbail for a list element Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-07 20:22 +0200
Re: Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-08 08:41 -0700
Re: Displaying a pop-up thumbail for a list element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-07 21:20 +0200
Re: Displaying a pop-up thumbail for a list element Dr J R Stockton <J.R.Stockton@physics.org> - 2014-06-08 08:45 -0700
csiph-web