JsBarcode
JsBarcode copied to clipboard
codabar cannot be initiated via options in the HTML element
Hi, I tried to init using options in the HTML element:
<svg class="barcode"
jsbarcode-format="codabar"
jsbarcode-value="123456789012"
jsbarcode-textmargin="0"
jsbarcode-fontoptions="bold">
</svg>
And then initialize it with:
JsBarcode(".barcode").init();
But I get the following error:
Uncaught TypeError: e is not a constructor
Could you assist please?
P.S.
It work's fine with <svg id="barcode3"></svg>
and JsBarcode("#barcode3", "1234", {
format: "codabar"
});