-
Notifications
You must be signed in to change notification settings - Fork 1
.hide()
hlaCk edited this page Dec 21, 2018
·
1 revision
Hide any element.
_z(selector).hide();
- _z to access UnderZ library.
- selector select element by the selector to hide. ( you can send DOM element or selector)
- hide method/action name.
Returns: _z(selector) Object
To show an element: Show element
<button id="button">Button !</button>
<button id="buttonHide">Hide button</button>
<button id="buttonShow">Show button</button>
<script>
// bind click event by element id
_z("#buttonHide").click(function () {
// hide element
_z("#button").hide();
});
// bind click event by element id
_z("#buttonShow").click(function () {
// show element
_z("#button").show();
});
</script>Recommended: bind events in .ready() to execute the event when the document is fully loaded.