Yii 1.1: backtotop

This small widget provide back to top function to your page

This widget wraps BackToTop jquery plugin.


Usage ΒΆ

You can copy widget into extensions folder, such as:


Use it in your view file:

    'text'=>'Back To Top',

List of options for this widgets:

text: String, Default : '^ Back to top' - Text written into the link

autoShow: Boolean, Default : true - Does the link appears during scrolling the page or is always displayed ?

timeEffect: Integer, Default : 500 - Duration (in ms) of the scrolling effect, from the bottom to the top of the page

effectScroll: String, Default : 'linear' - all jQueryUI effects allowed

appearMethod: String, Default : 'slide' - How does the link appear ? Can be set to 'fade', 'slide' or empty

Total 6 comments

#16223 report it
skworden at 2014/01/31 12:40am

If you want to use just an arrow here is a link to a website with tons of html arrows

HTML Arrows and others

#10645 report it
skworden at 2012/11/10 10:51pm

Will do. It just started to work for no reason :/. How can you get this to show on top of your items. i.e. it shows behind my cjutabs? it shows on top of a regular page with image and text.

#10644 report it
David T at 2012/11/10 10:38pm

I am using Yiibooster (boostrap extension) and it's working. You can try to change position of widget by chrome inspector and firebug then apply change to BackToTop.jquery.css

#10643 report it
skworden at 2012/11/10 09:58pm

EDIT: I don't why but my cache didn't clear and i thought it did. i had to cache my assets again. Thanks for you help!

#10642 report it
David T at 2012/11/10 09:54pm

You can edit the file: assets/css/BackToTop.jquery.css

at line 11 , in order show it at the top you can change "bottom" to "top", for example

top: 20px; right:80px;

And after changed, in order to apply your changes. you should delete all cached items in assets folder under webroot ( not our extension assets folde r)

#10641 report it
skworden at 2012/11/10 09:42pm
Good ext!

I have a question. I have it installed and it works perfectly! The only issue i have is that it always appears in the lower right corner no matter where i put it, in a div, another widget etc. I tried to change it in the css however that didn't work. When it's in the corner it is partially hidden by my footer. How do i change the placement to be on top of the footer or another location?

Thank you

Leave a comment

Please to leave your comment.

Create extension