Documentation
Website display: widget
One script and an attribute next to the price — for any website.
<script src="https://sidro-cjenici.vercel.app/w.js" data-sidro="your-code" async></script>
<!-- next to the price -->
<span data-sidro-sifra="KR-500"></span>
The widget finds all elements with data-sidro-sifra, fetches those items’ anchor prices and writes e.g. “Sidrena cijena (10. 9. 2026.): 1,89 €” as plain text.
| Attribute | On | Meaning |
|---|---|---|
data-sidro |
script | your public code (required) |
data-jezik |
script | hr or en (default from <html lang>) |
data-sidro-sifra |
element | item code |
data-oznaka |
element | custom label |
data-datum="ne" |
element | hide the date |
It follows page changes: new elements and changes of data-sidro-sifra (e.g. on variant selection). Style it with .sidrena-cijena, .sidro-oznaka, .sidro-iznos. No cookies, no tracking.