# j-ContentSlider

> The code below solves a problem with rendering component when the the component is dynamically displayed.

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

- supports great features
- works with Bootstrap Grid System


__Configuration__:

- `selector {String}` Optional, default `a`
- `interval {Number}` Optional, refresh interval (default `3000`)
- `cache {String}` Optional, when it's filled then the component saves a current state into the `localStorage` - so when the user refreshes the page then the component continues from the last state

__Redraw__:
The code below solves a problem with rendering component when the the component is dynamically displayed.

```javascript
SETTER('contentslider/refresh');
```

Use it with `<ui-component name="contentslider">`. 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
<div class="row">
	<div class="col-md-4 col-md-offset-4">
		<ui-component name="contentslider" config="cache:id-for-caching-latest-state" class="hidden">
			<a href="javascript:void(0)" style="background-color:red;height:50px;display:block;color:white">A</a>
			<a href="javascript:void(0)" style="background-color:blue;height:50px;display:block;color:white">B</a>
			<a href="javascript:void(0)" style="background-color:green;height:50px;display:block;color:white">C</a>
			<a href="javascript:void(0)" style="background-color:gray;height:50px;display:block;color:white">D</a>
			<a href="javascript:void(0)" style="background-color:black;height:50px;display:block;color:white">E</a>
		</ui-component>
	</div>
</div>
```
