Hello. If we don't want the animations because we want to eliminate the use of TweenMax to lighten our Javascript load, how can we simplify calls like this?
To get rid of animation simply look for onComplete callback function and remove code starting from TweenMax.set to TweenMax.to so in your case this code:
Thank you Arlind. I thought that may be the case, but just wanted to confirm so I don't run into any "unexpected" complications. It appears to work good.
Last question, I believe "Sine" is also an object from Greensock.
Will it be fine to just comment the easing line out from this call:
Hello. If we don't want the animations because we want to eliminate the use of TweenMax to lighten our Javascript load, how can we simplify calls like this?
TweenMax.set($submenu, {css: props_from});
TweenMax.to($submenu, options.submenu_open_delay, {css: props_to, ease: options.submenu_open_easing, onUpdate: ps_update, onComplete: function()
{
$submenu.attr('style', '');
}});
TweenMax.to($submenu, options.submenu_open_delay, {css: {height: 0, opacity: .2}, ease: options.submenu_open_easing, onUpdate: ps_update, onComplete: function()
{
$submenu.removeClass('visible');
}});
We are fine having no animations at all.
Thank you!
Hi SunnysGlimpse,
To get rid of animation simply look for onComplete callback function and remove code starting from TweenMax.set to TweenMax.to so in your case this code:
Would be: Does this help you?Thank you Arlind. I thought that may be the case, but just wanted to confirm so I don't run into any "unexpected" complications. It appears to work good.
Last question, I believe "Sine" is also an object from Greensock.
Will it be fine to just comment the easing line out from this call:
Thank you!
Hello SunnysGlimpse,
No worries, you can ask anything related to Neon I will be happy to help you.
Removing the easing (Sine object) won't cause any issue, its just an addition to animation so feel free to comment it.