On 13 Feb, 15:31, Feed <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I think I've looked all plugins available on jquery.com and haven't
> found what I need.

hi :)
you don't need all of the plugins, but just one: Brandon Aaron's
'dimensions'
http://brandonaaron.net/docs/dimensions/

I wouldn't use float, but absolute positioning.
create a div like this

<div id="backToTop"><a href="#"><img src="arrow_up.gif" title="back to
top"></a></div>

which bears these style rules

#backToTop {
        position:absolute;
        top:0;
        left:0;
        border:2px solid #999; /*border as you please*/
}

and here's all the jQuery you need:

$(document).ready(function(){
        $(window).scroll(function(){
                $('#backToTop').stop();
                var scroll = $(window).scrollTop();
                $('#backToTop').animate({top: scroll});
        });
});

Reply via email to