Home » jQuery » Generate multiple barcode with jQuery and Barcode-coder

Generate multiple barcode with jQuery and Barcode-coder

jQuery library for generating barcode like Barcode-coder, provides useful and simple barcode generator library. It support multiple format like BMP, CSS, and SVG. However, it lacks of documentation of how to generate multiple barcode. In this post I give a tips to make that library work in generating multiple barcode.

The official documentation just show us of how to write barcode in a single <div> tag with specific ID. It’s impossible if we want to make multiple barcode with a single <div> tag. Fortunately, we can wrap our generated barcode in a separate <div> tag inside the main <div> tag, and added as the last element. Here is the JavaScript file :

You can then try that JavaScript by using this HTML :

With these two scripts, you can generate barcode with code-128 and add barcode dynamically by pressing the button.

Hope this useful for you.


    • To generate different barcode at once, you should generate all code for your barcode in javascript, and then throw them to jquery to iterate to display barcode. Hope this will help you.

Leave a comment

Your email address will not be published. Required fields are marked *