convert is a jQuery plugin that you can call on a selector to convert from one unit to another. Supports weight, length, volume, and temperature
- include jquery and convert
- call convert()
<script src="jquery.min.js"></script>
<script src="convert.js"></script>
<script>
$("#test").convert({
from: 'ton',
to: 'lb'
});
</script>
- from: the unit you want to convert from (default is oz)
- to: the unit you want to convert from (default is gm)
- dram: dr
- ounce: oz
- pound: lb
- stone: st
- quarter: qr
- hundredweigth: cwt
- ton: ton
- milligram: mg
- gram: gm
- kilogram: kg
- tonne: Mg
- millimeter: mm
- centimeter: cm
- meter: m
- kilometer: km
- inch: in
- foot: ft
- yard: yd
- mile: mi
- fluid Ounce: fl oz
- cup: cup
- pint: pt
- quart: qt
- gallon: gal
- centileter: cl
- milliliter: ml
- liter: l
- celcius: C
- fahrenheit: F