Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lindell/JsBarcode
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell committed Mar 16, 2016
2 parents 30c5bd2 + 18f6454 commit 680abd9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,20 @@ The default options:
````javascript
{
width: 2,
height: 100,
quite: 10,
format: "auto",
displayValue: false,
height: 100,
format: "auto",
displayValue: true,
fontOptions: "",
font: "monospace",
textAlign: "center",
textPadding: 0,
fontSize: 12,
backgroundColor: "",
lineColor: "#000"
textMargin: 2,
fontSize: 14,
background: "#fff",
lineColor: "#000",
margin: 10,
marginTop: undefined,
marginBottom: undefined,
marginLeft: undefined,
marginRight: undefined
}
````
8 changes: 7 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<title></title>
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
<script src="../JsBarcode.all.min.js"></script>
<script>
Number.prototype.zeroPadding = function(){
var ret = "" + this.valueOf();
return ret.length == 1 ? "0" + ret : ret;
};
</script>
</head>
<body>
<div>
Expand Down Expand Up @@ -34,7 +40,7 @@
<script>
var repeat4 = function(){
var date = new Date();
$("#barcode4").JsBarcode(date.getHours()+":"+date.getMinutes()+":"+date.getSeconds());
$("#barcode4").JsBarcode(date.getHours().zeroPadding()+":"+date.getMinutes().zeroPadding()+":"+date.getSeconds().zeroPadding(), {displayValue: true});
};
setInterval(repeat4,1000);
repeat4();
Expand Down

0 comments on commit 680abd9

Please sign in to comment.