Monday, July 22, 2013

Switch between metric and imperial systems at online ruler

Recently I've added switcher between inches and centimeters to PreciseRuler.com

Now you can choose what to see ruler with centimeter's marks or with inches. Moreover your choice will be saved and you will see the same ruler next time you visit PreciseRuler.com.

Last time I said that using Twitter Bootstrap can simplify web site development. To back my words with confirmation I'd like to show how easy it was done:
        <div class="btn-group" style="float: right">
            <button class="btn" id="cmButton">CM</button>
            <button class="btn" id="inchButton">INCH</button>
        </div>
Then all you need is to assign a handler:
       $("#cmButton").click(function(){
            ...
        });
        $("#inchButton").click(function(){
            ...
        });
PS And yes, I have just 19'', size doesn't matter ;)

No comments:

Post a Comment