I have this code:
var one; $(\"#ma1\").click(function() { var one = 1; }) $(\"body\").click(function() {
var one;//define outside closure $("#ma1").click(function() { one = 1; //removed var }) $("body").click(function(e) { $('#status').html("This is 'one': "+one); })