Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

 1 Answer(s)

  • I would like to address some issues in your code.
    The very first thing is your code seems to be using jQuery, but the jQuery library is not included on the page.
    Additionally, If you check your console, you will find an error message :

    ReferenceError: $ is not defined
    $("#calculate").click(function() {
    

    You are trying to create a custom id based selector,

    var $ = function (id) {
        return document.getElementById(id);
        }
    

    In this process you assign your function to variable "$", which is itself an object of jQuery. This assignment destroys the jquery object, Hence the above error.

    For solution, check this fiddle

    I suggest you to read about javascript scope and callbacks.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: