Minimal jQuery Based Unit Converter - convert.js

File Size: 3.36 KB
Views Total: 4100
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Minimal jQuery Based Unit Converter - convert.js

convert.js is a simple, lightweight jQuery unit converter which allows for converting selectors to different units with one JS call. The plugin allows you convert between most of the units such as: weight, length, volume, and temperature.

How to use it:

1. Add the jQuery convert.js script after jQuery library.

<script src="//"></script>
<script src="convert.js"></script>

2. Wrap the measurement into a DIV container:

<div id="demo"> 1 </div>

3. Call the function and specify the units you want to convert from (to).

  from: 'F',
  to: 'C'

4. Units supported:

  • Imperial weight: 'dr', 'oz', 'lb', 'st', 'qr', 'cwt', 'ton'
  • Metric weight: 'mg', 'gm', 'kg', 'Mg'
  • Standard length: 'in', 'ft', 'yd', 'mi'
  • Metric length: 'mm', 'cm', 'm', 'km'
  • Standard volume: 'fl oz', 'cup', 'pt', 'qt', 'gal'
  • Metric volume: 'cl', 'ml', 'l'
  • Temperature: 'F', 'C'



This awesome jQuery plugin is developed by ignoreintuition. For more Advanced Usages, please check the demo page or visit the official website.