Skip to content

Instantly share code, notes, and snippets.

@jehoshua02
Created August 16, 2013 06:51
Show Gist options
  • Select an option

  • Save jehoshua02/6247812 to your computer and use it in GitHub Desktop.

Select an option

Save jehoshua02/6247812 to your computer and use it in GitHub Desktop.
<!-- inputs -->
<input type="hidden" name="funding" value="85" data-caption="Funding" />
<input type="hidden" name="completion" value="25" data-caption="Completion" />
<!-- non-inputs -->
<div class="meter" data-value="67%" data-caption="Funding"></div>
<div class="meter" data-value="43%" data-caption="Completion"></div>
<script src="jquery.js"></script>
<script src="meter.js"></script>
<script>
$(function () {
$('input[name=funding]').meter({
width: 50px,
height: 100px,
color: white,
background-color: green,
});
$('input[name=completion]').meter({
width: 50px,
height: 100px,
color: white,
background-color: blue
});
$('.meter').meter(); // perhaps javascript can get styles from css on selected elements?
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment