This widget do this:
$('html, body').animate({ scrollTop : 0 }, 'slow');
Copy ScrollTop.php script in /protected/extensions folder.
Yii 1.1 or above
Simplest way to use this widget:
$this->widget('ext.ScrollTop');
Configurable
$this->widget('ext.ScrollTop',array( 'label' => 'Go on top', 'speed' => 'slow' ));
Total 6 comments
thanks sensorario, its a simple and useful extension !
ok!! Now the project is on github =). If anyone want contribute, fork, or make some pull request ... any suggestions are wellcome!
hehehe :) ; simple ! it 's helpful , may be one can make the to top link more beautiful , a back-ground gif picture is not bad . suggestion :
expose more options of the "a" element ,use the CHtml::link();
I've found a little bug. Using more time this widget, cause a conflict and animation dont start. I've already fix it and uploaded new zip archive.
@simple A friend tell me: Keep It Simple Stupid!
(maybe this widget is too simple :-p jajaja)
simple
thx sensorasio...
Leave a comment
Please login to leave your comment.