[jQuery] Re: An animated gif in the middle

2009-03-06 Thread Martijn Houtman
On Mar 6, 12:33 am, phicarre wrote: > How to show IN THE MIDDLE OF THE SCREEN an animated gif (with jquery > effects) during a long operation ? > I tried several methods but never compatible with, at least, FF and > IE ... Why not just use CSS background-position: 50% 50% and use a to create an

[jQuery] Re: An animated gif in the middle

2009-03-06 Thread ryan.j
give the element a CSS attribute of margin: 0 auto; and then set the top margin with.. var a = $(window).height() var b = $("img#loadingImg").attr("height") $("img#loadingImg").attr("margin-top", ((a/2)-(b/2)) ); On Mar 6, 10:26 am, phicarre wrote: > I supposed that someone knows a plugin who d

[jQuery] Re: An animated gif in the middle

2009-03-06 Thread ryan.j
$("img#loadingImg").attr("margin-top", ( ( $(window).height()/2 ) - ( $ ("img#loadingImg").height()/2) ) ); On Mar 6, 10:26 am, phicarre wrote: > I supposed that someone knows a plugin who does that ... > > On 6 mar, 00:39, dawnerd wrote: > > > What you are trying is more CSS based than jquery

[jQuery] Re: An animated gif in the middle

2009-03-06 Thread ryan.j
$("img#loadingImg").attr("margin-top", (($(window).height()/2)-($ (window).height()/2)) );

[jQuery] Re: An animated gif in the middle

2009-03-06 Thread phicarre
I supposed that someone knows a plugin who does that ... On 6 mar, 00:39, dawnerd wrote: > What you are trying is more CSS based than jquery based. You can set > the images css to margin:0 auto; which will center align it. Then set > some top padding or margin to vertically align it. > > On Mar

[jQuery] Re: An animated gif in the middle

2009-03-05 Thread dawnerd
What you are trying is more CSS based than jquery based. You can set the images css to margin:0 auto; which will center align it. Then set some top padding or margin to vertically align it. On Mar 5, 3:33 pm, phicarre wrote: > How to show IN THE MIDDLE OF THE SCREEN an animated gif (with jquery