Path: csiph.com!news.mixmin.net!news.albasani.net!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Getting the index of a clicked element Date: Fri, 07 Jun 2019 20:33:36 +0200 Organization: PointedEars Software (PES) Lines: 47 Message-ID: <2485496.mvXUDI8C0e@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: news.albasani.net yQINzwctA90t5bj2ASpVk01UWv/N3GjQOBbwixVYOpK1o5VTwQ8TmJfWqZphMNE08b4fvLG6LRzViTJiMBpt9g== NNTP-Posting-Date: Fri, 7 Jun 2019 18:33:38 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="Zl/8WXyq4pbG7cZYd4xNQEb+Vlol6+GhsIIBuoIUCrtBpy0YlD/wZBm9kT0+pqQLy9fFgy+LGnJEp2GG/dGgRiNA6F0GJD2PQ2MkzKS4NmPmz5gb85SlM135sKymIOPg"; mail-complaints-to="abuse@albasani.net" User-Agent: KNode/4.14.10 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. To explain the rationale behind the choices: Your design choices appear to be driven mostly by ignorance and misconceptions about Web development and Web browsers. A recipe for disaster. > First, I want, for convenience, to be able to type the answers in > directly under the questions to which they correspond. Since the page is > intended to begin with the answers hidden that meant having them present > but hiding them on page load. It is not a good idea to manipulate the document tree on page load as that will slow down rendering. Hiding elements is OK, changing their content in most cases (and certainly in this one) is not. > Second, I don't want the way to hide the text to be by making it > invisible (e.g. by setting a CSS property) as I fear that could end up > with the browser's 'find' function irritating the user by finding text > the user cannot see. Working browsers will not let users “Find” content that have style “display: none” or HTML5’s “hidden” attribute set. > Third, I want this to be compatible with many browsers and generations > of browser so didn't want to use the data- features which I've heard are > part of the 'ultra modern' HTML5. :-) For suitable values for “ultra modern”. HTML5 is best current practice since almost 5 years ago – an eternity on the Web. The current W3C Recommendation is HTML 5.2 of 2017, work on HTML 5.3 is in progress. Be aware that using scripting instead of plain HTML and CSS already sacrifices some compatibility. > Fourth, I want the web page “Where we are developing, there are no "web pages".”¹ _______ ¹ apologies to Robert Zemeckis -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.