leoo
v1.0.2
Published
Create a lazy HTML element every time you scroll on the last element of a HTML container.
Downloads
3
Readme
Content
Features ✨
- Create a lazy element when you scroll.
- Create a beautiful HTML page.
Install 🐙
Add this script in your HTML to access Leo.
<script crossorigin src="https://unpkg.com/[email protected]/umd/leo.client.min.js"></script>
Exemples 🖍
new Leo("main", [
{
htmlContainer: 'section',
class: ["t"]
},
{
htmlContainer: "section",
class: ["l"],
template: `
<h1>You can use backticks with multiples lines</h1>
<p>An other html element</p>
`
},
{
htmlContainer: "div",
class: ["test", "m"],
template: `<h1>Test Leo</h1>`
}
]);
Let's try this script it will create three elements in the
<main></main>
HTML element.
API 👩💻
Once you include the script you can access the Leo class.
Class new Leo(container, ops, [options])
.
The leo class allow you to create lazy HTML elements.
container
- The container where the elements would be create, can be an HTML tag, class or id.ops
- An array of objects.[options]
- Object option[options.infinite]
default -> false - If true recreate infinitely elements.
License ⚖️
@MIT