Linking a thumbnail to a larger image... the El Reg way.
-
So, if you're writing a story on El Reg, and you want to include a smaller version of an image that people can click on to open a larger version, how would you do it?
If you said '<a href="big_image.jpg"><img src="small_image.jpg"></a>', you clearly haven't put your Complicator's Gloves on first. No, this is how you do it:
[quote user="http://www.theregister.co.uk/2013/09/11/doctor_who_50th_anniversary_pic/"]
<p>
<a target="_blank" href="http://regmedia.co.uk/2013/09/11/doctor_who_50th_anniversary_poster_large.jpg"></a></p>
<a target="_blank" href="http://regmedia.co.uk/2013/09/11/doctor_who_50th_anniversary_poster_large.jpg"> </a><div class="article_side_content not_moved">
<a target="_blank" href="http://regmedia.co.uk/2013/09/11/doctor_who_50th_anniversary_poster_large.jpg"> </a><div id="article-mpu-container"><div id="ad-mu1-spot" class="adu">
<a target="_blank" href="http://regmedia.co.uk/2013/09/11/doctor_who_50th_anniversary_poster_large.jpg"><script type="text/javascript">
show_gpt('ad-mu1-spot');
</script>
<noscript>
</noscript></a><a href="http://pubads.g.doubleclick.net/gampad/jump?iu=/6978/reg_business/media&sz=300x250%7C300x600&tile=3&c=33UjBX8sCoZHEAAGU5bxUAAAN6&t=ct%3Dns%26unitnum%3D3%26unitname%3Dwww_top_mpu%26pos%3Dtop%26test%3D0" target="_blank">
<img style="display: none;" src="http://pubads.g.doubleclick.net/gampad/ad?iu=/6978/reg_business/media&sz=300x250%7C300x600&tile=3&c=33UjBX8sCoZHEAAGU5bxUAAAN6&t=ct%3Dns%26unitnum%3D3%26unitname%3Dwww_top_mpu%26pos%3Dtop%26test%3D0" alt=""></a>
</div>
</div>
</div><div class="CaptionedImage Center Float"><img src="http://regmedia.co.uk/2013/09/11/doctor_who_50th_anniversary_picture_small.jpg" alt="Doctor Who 50th Anniversary episode poster" title="Doctor Who 50th Anniversary episode poster. Credit: BBC" height="687" width="650"><p>Click for a bigger image</p>
[/quote]What's the result of all that javascripty goodness? The exact same as doing it the simple way; you get an image that you click on and the browser navigates to it. Oh, unless you try to middle-click it (or "Open in new tab" from the context menu), in which case you get navigated to the thumbnail instead.
How is that useful?
EDIT: OMG, it's worse than I thought; I wasn't looking carefully enough. Even when you enable scripts, clicking on the image doesn't take you to the larger one that's mentioned in all those invisible zero-sized links; it just takes you to the small version as well. I thought it was just zoomed out.
D'OH!
-
How did I know this would be about the Dr Who poster before even clicking on the post ?
-
My frustration is not from seeing this kind of mindless construction.
My frustration comes from not being able to reach the person who typed this dried, flaky cum onto his/her screen.
-
@UriGagarin said:
How did I know this would be about the Dr Who poster before even clicking on the post ?
Well, did you perhaps visit El Reg earlier (in a script-enabled browser), read the story, click on the image and wonder why it didn't get any bigger?
-
15 years ago I'd have emailed Mike Magee about it and probably got an answer that made snese (old Reg Forum in-joke there ). Since he left/was ousted its been a little less friendly talking direct to the Reg journos
-
Nope cos I'd already read it on the Beeb, but saw the story on El Reg.
-
@UriGagarin said:
Since he left/was ousted its been a little less friendly talking direct to the Reg journos
Than talking to Spinola? Are you sure about that?
-
Ah Spinola - did you know Rick Wakeman owes him a pint?
Just a grumpy bugger online , but not too grumpy in real life.
-
@UriGagarin said:
Your answer doesn't make snese.15 years ago I'd have emailed Mike Magee about it and probably got an answer that made snese (old Reg Forum in-joke there ). Since he left/was ousted its been a little less friendly talking direct to the Reg journos