Customizing SMF > SMF Coding Discussion

Spoiler-BBCode in same line

<< < (2/2)

MrPhil:
If the desire is to have the spoiler "anchor" be in-line text and graphics in a <span>, rather than a <div>, perhaps it could be done with a link <a> that pops up a new floating window? You might look at various "fancy tool tip" and "lightbox" PHP codes. I think both of them generate Javascript, so at least part of the action is taking place on the browser. They may just use "onClick" rather than <a>.

A very simple minded system could probably be done with a Javascript function per spoiler (or a unique identifier to a shared function), onClick trigger in a <span>, and the function just puts up an alert box with your spoiler text. You'd probably accumulate the functions (or one function with text for all spoilers) to stick at the end of the output page.

Navigation

[0] Message Index

[*] Previous page

Go to full version