Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36849
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | James Harris <james.harris.1@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: How to make on-clickable div text look clickable |
| Date | Sat, 8 Jun 2019 19:25:06 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 47 |
| Message-ID | <qdgui8$vsa$1@dont-email.me> (permalink) |
| References | <qdg0hs$kmc$1@dont-email.me> <qdgetl$13lc$1@gioia.aioe.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 8 Jun 2019 18:25:12 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="c53ea6e8f8304a7f7268364e2fe4e83e"; logging-data="32650"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182zGWIq+anJAawKn/Nv37o0ggPkbd5Wdc=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
| Cancel-Lock | sha1:leTm+VnCsfBwQUepktENaAweOzA= |
| In-Reply-To | <qdgetl$13lc$1@gioia.aioe.org> |
| X-Antivirus-Status | Clean |
| Content-Language | en-GB |
| X-Antivirus | AVG (VPS 190608-0, 08/06/2019), Outbound message |
| Xref | csiph.com comp.lang.javascript:36849 |
Show key headers only | View raw
On 08/06/2019 14:58, R.Wieser wrote: > James, > >> do you have a preferred way of making that text look clickable? > > As a reader ? I would want to have it look like the real thing. You know, > underlined and with a certain color. Well, here's a page with standard links. What it has in common with what I intend for this application is that it has a short clickable piece of text per line. http://pensites.com/politics/article/ In that, clicking on a line of text links to a page. In what I want to do now, however, each line of text would be a question, and clicking on it would bring up the answer below. I mention it purely because I think it illustrates that in that form the default formatting for links isn't too pretty. > > As a writer ? I would probably use the "a" tag itself, setting the "href" > property to "javascript:your_function()". You know, letting the tag handle > all the nitty-gritty of making the text look clickable. > > https://stackoverflow.com/questions/7347786/html-anchor-tag-with-javascript-onclick-event?rq=1 > > Than again, I often go for the easiest solution (after having spend quite > some time googeling and testing what the easiest solution might be :-) ). > >> I should say I am not sure it would be good to use /all/ the browser's >> default formatting for this case > > In that case you will most likely confuse and (sooner rather than later) > annoy the user, which expects a certain uniformity. > > But you can ofcourse also go for Stefans suggsetion, and not change the text > itself but putting it on a button. Or maybe just a small button (with the > letter "A" - for Answer - in it) at the end of the question. Good points. Some people have a flair for styling. Unfortunately, I am not one of 'em! -- James Harris
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 10:52 +0100
Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 12:14 +0200
Re: How to make on-clickable div text look clickable "R.Wieser" <address@not.available> - 2019-06-08 15:58 +0200
Re: How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 19:25 +0100
Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 20:42 +0200
Re: How to make on-clickable div text look clickable "R.Wieser" <address@not.available> - 2019-06-09 10:02 +0200
Re: How to make on-clickable div text look clickable James Harris <james.harris.1@gmail.com> - 2019-06-08 19:17 +0100
Re: How to make on-clickable div text look clickable Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 20:40 +0200
csiph-web