Giter Site home page Giter Site logo

js-calculator's Introduction

Javascript Calculator

This is a simple calculator written completely in vanilla javascript and css. It uses CSS Grid for alignments.

How to use

Clients can use just the js file and give their own HTML and style. Please make sure that you add buttons with appropriate IDs as below.

 <div id="calculatorBtns">
                <div id="btnCE">CE</div>

                <div id="btnErase">Erase</div>
                <div id="btnDivide">/</div>
                <div class="numBtn" id="btn7">7</div>
                <div class="numBtn" id="btn8">8</div>
                <div class="numBtn" id="btn9">9</div>
                <div id="btnMulti">X</div>
                <div class="numBtn" id="btn4">4</div>
                <div class="numBtn" id="btn5">5</div>
                <div class="numBtn" id="btn6">6</div>
                <div id="btnSubstract">-</div>
                <div class="numBtn" id="btn1">1</div>
                <div class="numBtn" id="btn2">2</div>
                <div class="numBtn" id="btn3">3</div>
                <div id="btnAdd">+</div>
                <div class="numBtn" id="btn0">0</div>
                <div id="btnDot">.</div>
                <div id="btnEquals">=</div>
            </div>
            ```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.