-
Notifications
You must be signed in to change notification settings - Fork 57
$.show() & $.hide()
Arthur Guiot edited this page Jul 8, 2017
·
1 revision
As you can imagine, the $.show()
an element, and the $.hide()
function is to hide it. These 2 function are using the display:
style from CSS.
These functions only require an element as arguments, but no more. To see how they work, I'll take an example. When I click on a button, it will show an element, and if I click on another button, this element it will hide this element.
HTML:
<div class="toggleVisibility">You can see me!</div>
<button class="hide">Hide</button>
<button class="show">Show</button>
JS:
$.on($.select(".hide"), "click", $.hide($.select(".toggleVisibility"))
$.on($.select(".show"), "click", $.show($.select(".toggleVisibility"))
Don't hesitate to ask your questions
- Home
- The Core Languages
- Getting Started: Installation
- The Basics (
$.var()
+$.target()
) - Developing for DisplayJS
-
$.select()
- Text related
- If...else
$.xss()
$.repeat()
$.custom()
$.live()
$.load()
$.on()
$.onEvent()
$.ready()
- Scroll API
$.all()
$.clone()
$.is()
$.valEmpty()
$.remove()
$.show()
&$.hide()
$.ajax()
- Class Related
$.css()
$.getStyle()
- Fade effects
$.extend()
$.dynamic()
$.parent()
- Elements-Nodes
$.component()
$.time_ago()
$.copy()
$.then()
$.sleep()
$.getProp()