[Code] Spoiler on: January 11, 2015, 12:19:52 pm #1 {Code}: SpoilerDescription: Show/Hide objects(text, image, etc..)This code utilizes jQuery, please use the latest version found in this thread: 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>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 Last Edit: January 11, 2015, 07:00:14 pm by CyanProductions Logged
Re: [Code] Spoiler Reply #1 on: January 12, 2015, 04:15:18 am #2 We have one built in with the spoilder tags Logged Like Create A Forum? Support me at https://www.patreon.com/vbgamer45/
Re: [Code] Spoiler Reply #2 on: January 12, 2015, 06:35:58 pm #3 oh... :3This one is still customize-able,However, I'm sure it's possible to customize the built in spoilers. Logged
Re: [Code] Spoiler Reply #3 on: January 12, 2015, 06:39:09 pm #4 Quote from: CreateAForum on January 12, 2015, 04:15:18 amWe have one built in with the spoilder tagsIs it only possible to use in comments? This one can be used anywhere on the forum. Logged
Re: [Code] Spoiler Reply #4 on: January 12, 2015, 06:54:30 pm #5 Not sure. I know it works in topics. Logged Like Create A Forum? Support me at https://www.patreon.com/vbgamer45/