javascript - JQuery smooth animation -


i have animation makes buttons on screen 'beat'. works fine exept 1 thing, animation 'sharp' , not smooth, how can smooth it?

function myfunction() {     setinterval(function () {         tstfnc();     }, 1000); }  var flag = true;  function tstfnc() {     var numm = math.floor((math.random() * 10) + 1);     var stringm = '#mgf_main' + numm + ' img';      $(stringm).animate({         width: '80px',         height: '80px'     }, 150, function () {         $(stringm).animate({             width: '68px',             height: '68px'         }, 150, function () {             // nothing         });     }); }; 

you can set easing property on animate options.

http://api.jquery.com/animate/

http://easings.net/


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -