javascript - make div do -200px multiple times? -


i trying move div -200px original position when press button. want able multiple times.

function leftanimate(){          original = document.getelementbyid("sliderzelf").setattribute("style", "margin-left: -200px;");      }

this piece of code ( assume, correct me if im wrong.) sets attribute once -200px. there way can make -200px every new starting position?

since have used jquery-animate tag, shall presume have jquery. in case following should work:

function leftanimate() {     $("#sliderzelf").css("margin-left", "-=200"); } 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -