This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
forked from ilgilenio/Otag
-
Notifications
You must be signed in to change notification settings - Fork 0
.disp
Alper Kürşat edited this page May 24, 2018
·
1 revision
.disp( show boolean )
Sets visibility of an Element
If show is true Element is visible Else Element is hidden
Let's create an invisible element;
let Elem=''.disp();
O.ready.then(b=>b.append(Elem)); //Append to document body
<div style="display: none"></div>
Let's make Element visible
Elem.disp(true);
<div style="display: block"></div>
.disp method stores first display state.
#myFlexBox{
display: flex
}
let Box='#myFlexBox'.disp(); //Visibility : No
O.ready.then(b=>b.append(Box.disp(1))); //Visibility : Yes, Flex! ==> Append do doc.body
<div id="myFlexBox" style="display: flex"></div> <!--Visibility state protected-->
©️ Copyright | 2018 | |
---|---|---|
Otağ™ JS | ilgilenio® ⚙️ open source |