Web Component: j-Layout2
j-Layout2
This component is a much simple component compared to
j-Layout
.jComponent
v19|v20
Configuration:
parent
{String} can containparent
,window
or jQuery selector for theclosest
method (default:window
)margin
{Number} adds margin for theheight
(default:0
)autoresize
{Boolean} enables auto-resize (default:true
)
Methods:
- IMPORTANT
component.show(type)
can show a specific panel for mobile devices,type
can beleft
,right
ormain
component.resizescrollbar(panel_type)
resizes a scrollbar for a specific panelcomponent.scrolltop(panel_type)
scrolls to top for a specific panel
Panel types:
left
left panelright
right paneltop
top panel (it's panel on top of all panels)top2
top panel and usestop
key in the config (it is betweenleft
andright
panel)bottom
bottom panel (it's panel on bottom of all panels)bottom2
bottom panel and usesbottom
key in the config (it is betweenleft
andright
panel)main
main content
Layout:
Making of layout is very easy.
<div data-type="" data-size="" data-scrollbar=""></div>
Attributes:
data-type
must contain a type of sectiontop
,top2
,left
,right
,bottom
,bottom2
ormain
data-size
contains a size of sectionLG,MD,SM,XS
--> in pixels or percentage, example:200,200,200,0
(0
means hidden) or20%
(all values will inherit20%
)data-scrollbar="margin:50;visible:1"
enables scrollbar, possible values:selector
{String} optional, jQuery selector for scrollbar containermargin
{Number} scrollbar margin (default:0
)visible
{Boolean} shows the scrollbar
Good to know:
- learn from example
- each panel is
section
element and must containdata-type="top"
attribute with type of panel - define panels only which you will use
- ordering of all
section
elements isn't important
Author
- Peter Širka petersirka@gmail.com
- License
Created
16. february 2020
Updated
31. january 2023
jComponent library
19 | 20
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com