-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.init()
Johan Lindell edited this page Sep 20, 2016
·
1 revision
The .init()
function provides a way to specify the options of the rendering in HTML instead of the parameters.
Just set HTML attributes as jsbarcode-*
or data-*
where *
is any of the JsBarcode options.
<svg class="barcode"
jsbarcode-format="upc"
jsbarcode-value="123456789012"
jsbarcode-textmargin="0"
jsbarcode-fontoptions="bold">
</svg>
JsBarcode(".barcode").init();
If you want to generalize some options to all of the initialized barcodes you can do that by first calling the options function.
JsBarcode(".barcode").options({
width: 1,
height: 25,
margin: 0
}).init();
- Home
- Options
- Setup
- Browser Setup
- Node Setup
- Barcodes
- CODE128
- EAN / UPC
- CODE39
- ITF-14
- MSI
- Pharmacode
- Codabar