DIR Return Create A Forum - Home
---------------------------------------------------------
Create A Forum - Support Forums
HTML https://support.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Create a Forum Codes and Support
*****************************************************
#Post#: 15066--------------------------------------------------
[Code] Spoiler
DIR By: CyanProductions
Date: January 11, 2015, 6:19 am
---------------------------------------------------------
{Code}: Spoiler
---------------------------------------------------------
Description: Show/Hide objects(text, image, etc..)
This code utilizes jQuery, please use the latest version found
in this thread:
HTML http://support.createaforum.com/5/jquery-v1-8-update/
HTML http://support.createaforum.com/5/jquery-v1-8-update/
Footers:
--- Quote ---
> <script>
> $("[class*='show_text']").hide(); var show_count = 0; $(
".show_" ).click(function() { show_count = $(this).attr("id");
if ($("#" + show_count + ".show_text").is(":hidden")) {
$("#" + show_count + ".show_text").show(); $("#" +
show_count + ".show_hint").hide(); $(this).text("Hide") }
else { $("#" + show_count + ".show_text").hide(); $("#"
+ show_count + ".show_hint").show(); $(this).text("Show")
} });
> </script>
--- End Quote ---
Setup: Create html buttons: <button id="0"
class="show_">Show</button> | Create spoiler hint: <p id="0"
class="show_hint">(this is a spoiler)</p> | Create text that
hides and shows: <p id="0" class="show_text">This is Text</p>
Editing: If you would like to add more than 1 spoiler, simply
copy and paste the button and text. Change the 0 to
{1,2,3,4,5,6,7, etc...}
---------------------------------------------------------
Example:
[Show](this is a spoiler)
[Hide] This is text
---------------------------------------------------------
- Cyan
#Post#: 15074--------------------------------------------------
Re: [Code] Spoiler
DIR By: CreateAForum
Date: January 11, 2015, 10:15 pm
---------------------------------------------------------
We have one built in with the spoilder tags
#Post#: 15084--------------------------------------------------
Re: [Code] Spoiler
DIR By: CyanProductions
Date: January 12, 2015, 12:35 pm
---------------------------------------------------------
oh... :3
This one is still customize-able,
However, I'm sure it's possible to customize the built in
spoilers.
#Post#: 15085--------------------------------------------------
Re: [Code] Spoiler
DIR By: CyanProductions
Date: January 12, 2015, 12:39 pm
---------------------------------------------------------
--- Quote from: CreateAForum link ---
>
> We have one built in with the spoilder tags
>
--- End Quote ---
Is it only possible to use in comments? This one can be used
anywhere on the forum.
#Post#: 15086--------------------------------------------------
Re: [Code] Spoiler
DIR By: CreateAForum
Date: January 12, 2015, 12:54 pm
---------------------------------------------------------
Not sure. I know it works in topics.
*****************************************************
Page 1 of 1