Jquery Update Function like Unity3D -
my variable nim not updating seconds call
$( "#upbutton" ).click(function() { var nim = $("a").css("margin-top").replace("px", ""); nim+=70; $("#moved").css('margin-top',nim+'px'); });
nim = 70 , not change.
var nim = $("a").css("margin-top").replace("px", ""); $( "#upbutton" ).click(function() { nim += 70; $("#moved").css( 'margin-top', nim + 'px' ); });
Comments
Post a Comment