![]() |
Spoiler tag without javascript?
A few users have said the spoiler tag isn't working, and I suspect it is because their phone doesn't allow it. Is it possible to do it without javascript? Or what is the best way to handle this issue?
Right now this is what we're using: Code:
<div style="margin:20px; margin-top:5px"> |
I'm sure you'll see many different variations for this but here's what I use
Code:
<div style="margin:20px; margin-top:5px"> Edit: didn't look at the entire code but it looks exact same almost but I have no issues on either vb3 or vb4 forum on mobile. |
It's not possible to do this without JavaScript, it needs to catch the onclick event on the button so it can then open/close the div with the content.
|
Thanks for the replies. For anyone using a spoiler, have you ever had any complaints about people who click and nothing happens? I suspect it is due to their browser not allowing javascript. Is this the case?
|
It's highly unlikely that someone has JavaScript disabled. JavaScript is enabled on pretty much all desktop and mobile browsers nowadays, unless they manually disabled it in the settings.
|
Quote:
|
Looks like it is the mobile theme disabling it.
When using the desktop version the spoilers work fine. When using mobile the mobile theme, it doesn't. What's the quickest way to solve this issue? Thanks. |
I don't really understand what's going on there, but it seems like in the mobile style, the big area that say "Show" is not the thing that needs to be clicked to show it. There's another <input> tag that's not showing up at all.
|
Quote:
|
bump, thanks.
|
Try this: http://codepen.io/AngelKrak/pen/FojxE
|
Quote:
replacement: Code:
<input class="spoilerbutton" type="button" value="Show" onclick="this.value=this.value=='Show'?'Hide':'Show';"> additional.css: Code:
.spoilerbutton { |
Thanks for the replies, but still not working. This is the result of the original, the one Black Snow recommended, and the last one is OutL4w:
http://i.imgur.com/nVkQ2Yv.png Perhaps the theme is somehow messing with the show/hide. What's the best way to troubleshoot this? Thanks. |
Bump. Just got a new mobile theme going and the Show button still does nothing. Anyone have a spoiler working on mobile themes?
Thanks. |
Still haven't been able to get this to work, see screenshot here:
http://i.imgur.com/nVkQ2Yv.png Just tried this one too with the same result: https://vborg.vbsupport.ru/showthread.php?t=289968 Any ideas to get a spolier working on mobile would be appreciated, thanks. |
Edit: Problem solved. This works on mobile:
https://vborg.vbsupport.ru/showthread.php?t=279069 I modified it a bit for the option tag, and to make all content 80% width. But if you're having issue with the spoiler on mobile, the above will work. Thanks guys, hope that helps. |
Quote:
Code:
<div style="margin: 5px 20px 20px;"> I had to change a couple of things, until I finally got it to work. I tried to make it resemble the classic spoiler button. Code:
<input type="button" Every single spoiler that I've seen which uses button, doesn't work on the mobile skin. Quote:
|
All times are GMT. The time now is 04:03 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|