Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25273
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Element visible |
| Date | 2014-07-10 10:45 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <lplgam$fdo$1@dont-email.me> (permalink) |
| References | (1 earlier) <visibility-20140709041836@ram.dialup.fu-berlin.de> <j9idnT3Ozq34JSHOnZ2dnUVZ_hydnZ2d@westnet.com.au> <13026944.5APpuSVIFp@PointedEars.de> <wNmdnUw9Ar6cRyDOnZ2dnUVZ_sudnZ2d@westnet.com.au> <XnsA3665E3F5E33Feejj99@194.109.133.133> |
2014-07-10 10:15, Evertjan. wrote: > Do you have a javascript related Q? I have not had difficulties with understanding the question or with seeing it as being on-topic. The question was about ways to know if an element could be visible, and it seems obvious, in the context of this group, that it meant to ask how to test such a thing in JavaScript. Basically, how could you write a JavaScript function that takes an element node as argument and returns true or false depending on whether the element is visible or not. The main problem with the question is that it is too vague. What is “visible” in this context. You already made some good points about this. Apparently some of the conditions for being visible, in some sense, are things you cannot test in JavaScript, like the user being blind. But many things, like the position of the element, its dimensions, and CSS styles and HTML attributes that apply to it, can be tested, to some extent at least. Instead of theoretical discussions about such aspects and detailed treatment of how some specific things affecting visibility might be tested, maybe the OP should clarify what he is trying to accomplish. Some sample code, preferably with a link to an online demo, would greatly help in understanding what the practical problem is. -- Yucca, http://www.cs.tut.fi/~jkorpela/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-09 10:09 +1000
Re: Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-09 13:32 +1000
Re: Element visible "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-09 09:54 +0200
Re: Element visible Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-09 11:18 +0200
Re: Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-09 23:17 +1000
Re: Element visible John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-09 16:08 +0100
Re: Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-10 10:07 +1000
Re: Element visible "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-10 09:15 +0200
Re: Element visible "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-07-10 10:45 +0300
Re: Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-10 22:13 +1000
Re: Element visible "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-10 14:31 +0200
Re: Element visible Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-10 13:35 -0700
Re: Element visible "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-11 00:23 +0200
Re: Element visible Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-12 20:09 -0700
Re: Element visible "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-13 09:07 +0200
Re: Element visible John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-10 10:46 +0100
Re: Element visible Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-10 12:10 +0200
Re: Element visible Andrew Poulos <ap_prog@hotmail.com> - 2014-07-14 13:00 +1000
Re: Element visible Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-15 15:08 +0200
csiph-web