addon-interscroller
v1.0.6
Published
Element Interscroller Wrapper
Downloads
30
Readme
Installation
- Either download project manually OR
- Install with npm OR
npm i addon-interscroller
- Add hosted code link in
https://cdn.jsdelivr.net/npm/[email protected]/dist/interscroller.js
Usage
Addon interscroller wraps element into scrollable box.
- configure parameters / call function
<script>
window.stpdInterscroller = window.stpdInterscroller || {que:[]}
stpdInterscroller.que.push(function() {
stpdInterscroller.setConfig({
container: 'img[id="adElementId"]', // element + it's id or class
height: 250, // container height (px)
width: 0, // container width (px) / 0 - for 100%; will override to 100% if screen smaller than setting
showTitle: true, // show Ad title (true/false)
titleText: 'Advertisement', // title name
titleBackground: '#1AB6C5', // title block color (in HEX)
titleColor: '#FFF', // title block text color (in HEX)
overrideParentWidth: true // for overriding parent margins (true/false)
});
stpdInterscroller.run();
});
</script>