Hide and Show a single Pane
docemoon145
23 Aug 2018, 18:48So, for various reasons, I want to hide the inventory pane during combat. Thanks to @The Pixie I have a nice bit of code for that:
JS.eval ("$('#inventoryLabel').css('display', 'none')")
JS.eval ("$('#inventoryAccordion').css('display', 'none')")
found here: http://textadventures.co.uk/forum/samples/topic/5111/how-to-modify-the-user-interface
However, it would be bad if it vanished forever. I want to make the pane come back after combat is over. How would I do this? It seems like I just need to replace the 'none' with something else, but I have no idea what.
Thanks in advance.
Selsynn
23 Aug 2018, 20:53hello,
The command you search for is this one :
JS.eval ("$('#inventoryLabel').css('display', 'block')")
JS.eval ("$('#inventoryAccordion').css('display', 'block')")
mrangel
23 Aug 2018, 21:38Or if you want it on one line (and a little shorter), you could use:
JS.uiHide ("#inventoryLabel,#inventoryAccordion")
and
JS.uiShow ("#inventoryLabel,#inventoryAccordion")
docemoon145
24 Aug 2018, 02:24Thank you so much! I haven't tried the shortened version yet, but the other one worked like a charm!