Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Equivalent of [spoiler] in html

Featured Replies

OK, so I've got this blog on Wordpress, and I'm trying to use the equivalent of the hide parts of posts in the same way the spoiler-tag does here.

 

So basically, I want to do this

 

[spoiler=Click here for more]More

 

 

using HTML. I'm not sure if every HTML-code works on wordpress, anyone else have experience with wordpress that can help me?

There isn't such a code in html.

 

You have to use dhtml (dynamic html) which draws on javascripts to create collapsing tables.

Plv6Dz6.jpg

Operation Gold Sparkles :: Chompy Kills ::  Full Profound :: Champions :: Barbarian Notes :: Champions Tackle Box :: MA Rewards

Dragonkin Journals :: Ports Stories :: Elder Chronicles :: Boss Slayer :: Penance King :: Kal'gerion Titles :: Gold Statue

exxactly paw_claw. you can make a spoiler script with javascript, but their is not a tag for "spoiler"

 

you could use something like this:

    <script type="text/javascript">
function showSpoiler(obj)
   {
   var inner = obj.parentNode.getElementsByTagName("div")[0];
   if (inner.style.display == "none")
       inner.style.display = "";
   else
       inner.style.display = "none";
   }
   </script>

in the head

 

and this is the code to hide

<div class="spoiler">
   <input type="button" onclick="showSpoiler(this);" value="Show/Hide" />
   <div class="inner" style="display:none;">
   This is a spoiler!
   </div>

change "this is a spoiler!" to whatever you want. you cna change the value= to what you want the button to say.

 

change were it says

Proud Ubuntu User!

There are no stupid questions, just stupid people. -Scott Adams

A computer once beat me at chess, but it was no match for me at kick boxing.-Emo Phillips

My Blog!

TyrantElf.png

TyrantElf.png

I'm willing to bet that there is a wordpress app that will allow you to use this sort of functionality. Especially you are going to be using the actual CMS to do the posting, not HTML.

  • Author

Wow, thank you very much, that code will certainly be useful.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.