Description Coding Help
TappedOut forum
Posted on May 1, 2015, 11:14 p.m. by Doc28
HiI am trying to create buttons that when pressed reveal parts of my description. The first button had been working fine until I created the second one today.
Here is the deck for reference:
Wait... Who Runs Morph, Manifest, and Counters??? Playtest
Standard
SCORE: 2 | 5 COMMENTS | 315 VIEWS.
Here are the two pieces of code for reference:(I took out all the "<'s" in both pieces of code in order to expose the code)
button id="but.1" onclick="document.getElementById('div.1').style.display=''; document.getElementById('but.1').style.display='none';"Creatures and Creature Interactions /buttondiv id="div.1" style="display: none"button onclick="document.getElementById('div.1').style.display='none'; document.getElementById('but.1').style.display='';"Hide /buttonbr /pIn this section, I will talk about each creature, and then point out some important synergies to consider.
Avatar of the Resolute: This guy is an absolute beast. His body is great in the vanilla test, but his upsides are why he is in this deck as a 4-of. He contains one very important synergy I will get to later.
Deathmist Raptor: My favorite creature in the deck, this raptor never wants to say goodbye. His synergy with all the morph creatures in this build is insane, instant 4-of
Den Protector: This build's version of Eternal Witness. He can be used to recur any of our spells, making him invaluable.
Hidden Dragonslayer: Removal on a synergy piece? Count me in!!! Not much else to say about this one. Lifelink helps.
Servant of the Scale: Has two main uses: Either use him to trigger Avatar of the Resolute on turn 2, or buff him up with +1+1 counters and chump, causing your other creatures to gain some additional counters.
Fleecemane Lion: The latest edition to the crew, he is a strong turn 2 value play that can become nearly invincible late game.
Creature Synergies:
Servant of the Scale + Avatar of the Resolute = a 4/3 reach, trample on turn 2.
Deathmist Raptor + any one of 15 possible targets (Soul Summons included) = awesome recursion synergies with the Raptor. Crucial for the deck.
Den Protector + Collected Company/Feat of Resistance/Dromoka's Command/Secure the Wastes = a nasty, instant-speed suprise. My favorite interaction by far./p/div
button id="but.2" onclick="document.getElementById('div.2').style.display=''; document.getElementById('but.2').style.display='none';"Non Creature Spells/buttondiv id="div.2" style="display: none" button onclick="document.getElementById('div.2').style.display='none'; document.getElementById('but.2').style.display='';" Hide /buttonbr / pMastery of the Unseen: A great manifest engine that helps keep this deck going during the late game. Due to a bit of clunkiness, this is in as a 3-of.
Collected Company: Can hit all of my guys and is as brutal of an end-of-opponent's-turn play as you can have in this format.
Dromoka's Command: An extremely versatile option that can pose as cheap removal, a life saver, a buff to a guy, or an enchantment sac. The fact that you can choose two options makes this card very, very strong.
Feat of Resistance: A solid way to either protect my guys or give them pseudo-unblockable until end of turn. The little buff helps as well./p/div
I don't know how to read code, sorry, but Epoch wrote up how to make these buttons here. Just read about it there then copy and paste then make the mandatory changes.
May 2, 2015 12:10 a.m.
hyperlocke says... #4
Looking at the source code, you just create a button and give it an id. You have to tell the browser to make the spoilered part visible and hide the button.
< button id="but.1" onclick="document.getElementById('div.1').style.display=' '; document.getElementById('but.1').style.display='none';" >
Inside of div.1, you create a button that turns but.1 visible and hides div.1
Look in the formatting tips for the full code.
May 2, 2015 5:33 a.m.
hyperlocke says... #5
Let's see if it works this time...
< button id="but.1" onclick="document.getElementById('div.1').style.display=' '; document.getElementById('but.1').style.display='none';" >
Doc28 says... #2
oops it looks like not all the code is revealed disregard this thread sry
May 1, 2015 11:15 p.m.