Skip to content

Instantly share code, notes, and snippets.

@maxwellnewage
Created January 14, 2013 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxwellnewage/4530321 to your computer and use it in GitHub Desktop.
Save maxwellnewage/4530321 to your computer and use it in GitHub Desktop.
suma y resta con dos botones y los muestra en un div
$().ready(function(){
var cont = 0;
$("#sumar").click(function(){
cont++;
$("#result").html(cont);
});
$("#restar").click(function(){
cont--;
$("#result").html(cont);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment