Skip to content

Instantly share code, notes, and snippets.

@AntonKL
Created October 27, 2014 11:44
Show Gist options
  • Save AntonKL/d90c65f775383474b924 to your computer and use it in GitHub Desktop.
Save AntonKL/d90c65f775383474b924 to your computer and use it in GitHub Desktop.
räknare
<p>Antal kvadrat: </p> <input name="Antal kvadrat" id="squaremeeters" type="text" /> <br />
Summa:<p id="sum"></p>
Summa: (RUT) <p id="sumrut"></p>
$('#squaremeeters').keyup(calculate);
function calculate(e) {
var maths = $('#squaremeeters').val() * 50 ;
$('p#sum').text(maths);
var maths = $('#squaremeeters').val() * 25 ;
$('p#sumrut').text(maths);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment