tags:

views:

675

answers:

2

If in jgrowl.css the position is changed to 'center', how do I override this to default i.e, 'top-right'

 $.jGrowl(data, { header: 'data' ,animateOpen: { height: 'show'}, life: 10000,position:'top-right' });

Currently, Position doesn't work right now in the above

Thanks..

+5  A: 

Hi,

According to the jGrowl Options documentation for the position option

Designates a class which is applied to the jGrowl container and controls it's position on the screen. By Default there are five options available, top-left, top-right, bottom-left, bottom-right, center. This must be changed in the defaults before the startup method is called.

To do this, you'll have something like

    <script type="text/javascript">
           $.jGrowl.defaults.position = 'top-right';
    </script>

Then you can make your call as above and omit the position setting. Judging from the jGrowl docs, you HAVE to set the position by default and my quick tests confirmed that setting the position in your $.jGrowl(...) call, has no effect.

Hope that helps

Kamal
Hi,Thanks for that wonderful explaination. But i use jgrowl to be in the center also and also in the same application i want to use it in a different positio i.e, top-right,will this be applicable in this case also?
Hulk
Thanks Natrium u didnt answer this..
Hulk
Thanks kamal i got it working .Thanks for the help..
Hulk
A: 

hy Hulk, i have the same problem, I would like to be able to set the position for a jgrowl to center and to top-right for another, do you know how to do this? Thanks

illyassa
@illyassa ,you need to keep varying $.jGrowl.defaults.position according to your context..Let me know if you need more help.And if u give a small example i could help u more..
Hulk