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 <gam...@bluewin.ch> wrote: > I supposed that someone knows a plugin who does that ... > > On 6 mar, 00:39, dawnerd <dawn...@gmail.com> 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 5, 3:33 pm,phicarre<gam...@bluewin.ch> 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 ...