Jquery calculator
        Posted  
        
            by 
                Nemanja
            
        on Pro Webmasters
        
        See other posts from Pro Webmasters
        
            or by Nemanja
        
        
        
        Published on 2012-10-21T11:07:20Z
        Indexed on 
            2012/10/21
            11:20 UTC
        
        
        Read the original article
        Hit count: 296
        
jQuery
I want to make calculator for summation.
I have this jquery code:
 <script type="text/javascript">
 $(document).ready(function() {
     $("#calculate").click(function() {
    if ($("#input").val() != '' && $("#input").val() != undefined) {
        $("#result").html("Result is: " + parseInt($("#input").val()) * 30 );
         }
         else
         {
             $("#result").html("Please enter some value");
         }
    }); });
 </script>
<div id="calculator">
    <br />
    <input type="text" style="left:20px;" id="input" />
    <div id="result"></div>
    <input type="button" id="calculate" value="calculate" style="left:20px;" /> 
</div>
I want something like this:
I write number 5, then input + from keyboard and write another value.
Then to click on summation button and to get value.
Can anyone help me with this?
Thank you very much!
© Pro Webmasters or respective owner