Siema - multiple instances on a same page

Developer
Size
2,519 Kb
Views
72,864

How do I make an siema - multiple instances on a same page?

What is a siema - multiple instances on a same page? How do you make a siema - multiple instances on a same page? This script and codes were developed by Pawel Grzybek on 23 June 2022, Thursday.

Siema - multiple instances on a same page Previews

Siema - multiple instances on a same page - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Siema - multiple instances on a same page</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="siema"> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
</div>
<div class="siema"> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
</div>
<div class="siema"> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div> <div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
</div> <script src='https://pawelgrzybek.com/siema/assets/siema.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Siema - multiple instances on a same page - Script Codes CSS Codes

body { width: 100%; max-width: 30rem; margin: 0 auto;
}
img { width: 100%;
}
.siema { margin: 1rem 0;
}

Siema - multiple instances on a same page - Script Codes JS Codes

'use strict';
var siemas = document.querySelectorAll('.siema');
// this is fairly new way of looping through DOM Elements
// More about ithere: https://pawelgrzybek.com/loop-through-a-collection-of-dom-elements/
// For better compatibility I suggest using for loop
for (var _iterator = siemas, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } var siema = _ref; new Siema({ selector: siema });
}
Siema - multiple instances on a same page - Script Codes
Siema - multiple instances on a same page - Script Codes
Home Page Home
Developer Pawel Grzybek
Username pawelgrzybek
Uploaded June 23, 2022
Rating 3
Size 2,519 Kb
Views 72,864
Do you need developer help for Siema - multiple instances on a same page?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Pawel Grzybek (pawelgrzybek) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!