How to change the vibility of a button in dashcode programmatically?
-
01-10-2019 - |
문제
i'm using dashcode for a webapp and in order to add a + button in the browser bar to a specific view i need to hide and unhide that + button. The problem is i really don't know how to do this. I tried to write on the screen all the button's properties and in fact there is a visible parameter but when i display the value it shows "null" knowing that the button is visible...
So anyone has got an idea ? Thanks a lot !
해결책
put the button in a div
<div id="peekaboo">button</div>
then in the css set the visibility of peekaboo to the initial state visible or hidden then write a JavaScript function which will switch the css style state to visible or hidden as required.
Sorry i am away from my base computer so cannot access the code samples. can post better code tonight if you still need it
다른 팁
you can do this in two ways.
1)use display and toggle it (block/none) 2)use visibility and toggle it (visible/hidden)
If you want to know the difference between display and visibility, look at display docs