Created
December 29, 2016 16:41
-
-
Save linktohack/507067f2cae9428f204d3697fd6c0d7b to your computer and use it in GitHub Desktop.
Barcode generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var blocks = magasins.map(m => { | |
var block = $(` | |
<div class="block" style="display: inline-block; border: 2px dotted grey; margin: 10px; border-radius: 5px;"> | |
<p>${m.name}</p> | |
<img id=DB${m.pano} style="width: 200px"> | |
</div> | |
`); | |
return block; | |
}); | |
var all = $('<div>'); | |
blocks.forEach(it => it.appendTo(all)); | |
$('body').html(all) | |
magasins.forEach(m => { | |
$(`#DB${m.pano}`).JsBarcode(`DB${m.pano}`) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment