JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.css">
<link rel="stylesheet" href="http://jay.kanj.us/badge/badge.css">
<script src="http://jay.kanj.us/badge/badge.js"></script>
<div data-role='page'>
<div data-role='header'>
<h1>Some header</h1>
</div>
<div data-role='content'>
<a href='#' id='btn-1' data-role='button' data-inline='true'>Badge</a>
<button id='btn-2' data-inline='true'>Badge 2</button>
<div data-role="controlgroup">
<a href="#" id='btn-3' data-role="button">Yes</a>
<a href="#" id='btn-4' data-role="button">No</a>
<a href="#" id='btn-5' data-role="button">Maybe</a>
</div>
<div data-role="controlgroup">
<a href="#" id='btn-6' data-role="button">Yes</a>
<a href="#" id='btn-7' data-role="button">No</a>
<a href="#" id='btn-8' data-role="button">Maybe</a>
</div>
<div data-role="controlgroup" data-type="horizontal">
<a href="#" id='btn-9' data-role="button">Yes</a>
<a href="#" id='btn-10' data-role="button">No</a>
<a href="#" id='btn-11' data-role="button">Maybe</a>
</div>
<fieldset data-role="controlgroup" data-type="horizontal" >
<legend>Choose a pet:</legend>
<input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
<label for="radio-choice-1">Cat</label>
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" />
<label for="radio-choice-2">Dog</label>
<input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" />
<label for="radio-choice-3">Hamster</label>
<input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4" />
...
CSS
.other_badge {
color: white;
background-color: green;
}
JavaScript
$("#btn-1").mobileBadge({count: 4, position: "topright"});
$("#btn-2").mobileBadge({count: 7, position: "topleft"});
$("#btn-3").mobileBadge({count: 4, position: "topleft"});
$("#radio-choice-1").mobileBadge({count: 4, position: "topleft", classnames: "other_badge"});