Link-clicking pickiness on front page


ible

professional vim user
Joined
Mar 24, 2014
Messages
2,590
Location
Seattle, WA
if you use this code, you can click anywhere on the bubble to open or close it (for the "more info" pieces):

Code:
        <a id="show_id1" onclick="if (document.getElementById('spoiler_id1').style.display === 'none') { document.getElementById('spoiler_id1').style.display = ''; document.getElementById('click_info1').innerHTML='[Hide info]<br>'; } else { document.getElementById('spoiler_id1').style.display = 'none'; document.getElementById('click_info1').innerHTML='[Click for more info]<br>';}">
        <p id="text1">
            5" 720p LCD<br />with touchscreen!<br />
            <span id="click_info1" class="click_info">[Click for more info]<br /></span>
            <span id="spoiler_id1" style="display: none">Using a resistive touchscreen which allows a more accurate stylus.</span>
        </p>
        </a>

you also have to add the .click_info class to the font_size 12pt style declaration, i.e.:
Code:
#show_id1, #spoiler_id1, #show_id2, #spoiler_id2, #show_id3, #spoiler_id3, #show_id4, #spoiler_id4, #show_id5, #spoiler_id5, #show_id6, #spoiler_id6, #show_id1, #spoiler_id7, #show_id7, #spoiler_id8, #show_id8, .click_info
{  
font-size: 12px;
}
 
for reference, these are the original ones:
Code:
        <p id="text2">
            Gaming Controls<br />
            <a id="show_id2" onclick="document.getElementById('spoiler_id2').style.display=''; document.getElementById('show_id2').style.display='none';" class="link">
                [Click for more info]
            </a><span id="spoiler_id2" style="display: none">
            <a onclick="document.getElementById('spoiler_id2').style.display='none'; document.getElementById('show_id2').style.display='';" class="link">
                [Hide info]
            </a><br>Four shoulder buttons, one DPad, two analog nubs and six face buttons.</span>
        </p>

not sure if those degrade properly either -- what are you expecting them to degrade into?
 
Yeah, sorry for being slow - you did say the front page, and there aren't so many of those about. Your change sounds like a small improvement with no downsides that I can see. I support this change.
 
Thanks!
Could you give me the changed code for the full page at once?
I don't have that much time right now to change it for every bubble myself.
 
Back
Top