EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Pierre on September 30, 2017, 01:17:47 AM



Title: [SOLVED] Messager animation (fade)
Post by: Pierre on September 30, 2017, 01:17:47 AM
Hello
is it possible to add animation (fade) to messager alert?
I'm using simple alert:
$.messager.alert('Error','data','error');
and want to use fade animation (if possible) by opening and closing a messager.
Thank you.


Title: Re: Messager animation (fade)
Post by: jarry on September 30, 2017, 04:25:53 PM
The messager dialog extends from panel component, you can set the 'openAnimation' and 'closeAnimation' properties.
Code:
$.messager.alert({
title: 'Error',
msg: 'Here is a message!',
icon: 'error',
openAnimation: 'fade',
closeAnimation: 'fade',
shadow: false,
style: {
boxShadow: '0 7px 8px -4px rgba(0, 0, 0, 0.2)'
}
});


Title: Re: Messager animation (fade)
Post by: Pierre on September 30, 2017, 07:39:59 PM
Awesome, thank you so much.