Skip to content

Instantly share code, notes, and snippets.

@kadamwhite
Created April 10, 2014 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadamwhite/10393629 to your computer and use it in GitHub Desktop.
Save kadamwhite/10393629 to your computer and use it in GitHub Desktop.
Bar Code generator
$('body').append('<div class="container"></div>');
_.times(10, function() {
_.times(100, function(){
var $div = $('<div/>');
$div.addClass('line');
var rand = Math.random();
if (rand < 0.33) {
$div.addClass('left');
} else if (rand > .67) {
$div.addClass('right');
}
$('.container').append($div);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment