baron
baron copied to clipboard
Base structure
Man, please create base structure of baron and add to tutorial. I have been workiing with baron already two hours and dont understanding how it works. For example HTML
<div class="baron">
<div class="baron__scroller"></div>
</div>
bla bla bla CSS
.baron{}
.baron_scroller{}
bla bla bla
only rules that real needing for initialize baron
JS
baron({
scroller: ''
});
only options that real needing for initialize baron
Thanks
Same stuff for me)
HTML
<div id="baron_1" class="baron baron__root baron__clipper _simple">
<div class="baron__scroller">
// Your content
</div>
<div class="baron__track">
<div class="baron__bar"></div>
</div>
</div>
CSS you need @import "~baron/skins/styles.css" and select one of 3 classes(for example baron__clipper _simple like this) and your element(in this example element with id=#baron_1 must have a height, for example 300px
JS
baron({
scroller: `#baron_1`,
track: `.baron__track`,
bar: `.baron__bar`
});