Elements show() - KirkGarcia182/domExtend GitHub Wiki
Changes the elements display depending on the passed parameter. If no parameter was passed then it will change the element's display to inherit
element.show([display])
display (Optional) - A String
that represents what the display value of the element is.
The element you just manipulated so you can chain these methods.
<!DOCTYPE html>
<html>
<head>
<title>domExt Examples</title>
</head>
<body>
<div id="app">
<div class="menus">
<ul id='menuList'>
<li><a class='menuLink'>Menu 1</a></li>
<li><a class='menuLink'>Menu 2</a></li>
<li><a class='menuLink'>Menu 3</a></li>
</ul>
</div>
</div>
<script type="text/javascript" src="domExt.js"></script>
<script type="text/javascript">
window.$ = document;
let app = $.byId('app');
app.hide();
app.show();
console.log(app);
/* Result
<div id='app' style='display: inherit'>
*/
app.hide();
app.show('inline-block');
console.log(app);
/* Result
<div id='app' style='display: inline-block'>
*/
</script>
</body>
</html>