# j-Sticker

> j-Sticker: NEW: minheight {Number} a minimal height of scroll area for applying of classes

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 19cb287f5a79726f4e731a54b0567ed8e59f22a23fb6118adfb82acb67be4049
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

__Configuration__:

- `on {String}` this class is enabled when the `scroll top` position is greater than this element `Y` position
- `off {String}` this class is enabled when the `scroll top` position is smaller than this element `Y` position
- `margin {Number}` a margin which will be deducted from the `top` position of the current element
- `xs {Boolean}` enables sticker for extra small display (default: `false`)
- `sm {Boolean}` enables sticker for small display (default: `true`)
- `md {Boolean}` enables sticker for medium display (default: `true`)
- `lg {Boolean}` enables sticker for large display (default: `true`)
- `type {String}` a method name for obtaining of position `offset` (default) or `position`
- `marginparent {Number}` a margin for `parent` scrolling (default: `0`)
- `parent {String}` optional, a parent selector (look to example for understanding)
- __NEW__: `minheight {Number}` a minimal height of scroll area for applying of classes

Use it with `<ui-component name="sticker">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<style>
	.fixed { position: fixed; background-color: red; right: 0; top: 0; left: 0; padding: 20px 0; text-align: center; color: white; }
	.relative { background-color: blue; padding: 10px; border-radius: 4px; position: relative; display: inline-block; color: white; }
</style>

<div style="padding:50px; height:1500px">
	<div style="background-color:#F0F0F0;height:500px;margin:200px 0 0">
		<ui-component name="sticker" config="parent:parent" style="position:absolute">
			This text will depent on parent position.
		</ui-component>
	</div>
</div>
<hr />
<div style="padding:50px; height:1500px">
	<ui-component name="sticker" config="on:relative;off:fixed">
		This text will be on fixed position.
	</ui-component>
</div>
```
