Strict Standards: Declaration of action_plugin_dlcount::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/dlcount/action.php on line 14

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/indexmenu/action.php on line 169

Strict Standards: Declaration of action_plugin_ipban::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/ipban/action.php on line 67

Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/loglog/action.php on line 82

Strict Standards: Declaration of action_plugin_navi::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/navi/action.php on line 46

Strict Standards: Declaration of action_plugin_uparrow::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/uparrow/action.php on line 69

Strict Standards: Declaration of action_plugin_userspagecreate::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/userspagecreate/action.php on line 97

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/www/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/auth.php on line 312

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/actions.php on line 154
Smooth Scroller to a top anchor [phpwcms-HowTo:wiki]

Strict Standards: Declaration of syntax_plugin_code::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/code/syntax.php on line 41

Strict Standards: Declaration of syntax_plugin_tip::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/tip/syntax.php on line 38

Smooth Scroller to a top anchor

By default, the browser “jerks” you up or down in the page when you click on an anchor – SmoothScroll lets you define the duration that it should take for a link to be scrolled down to.

Idea: David Walsh - http://davidwalsh.name/smooth-scroll-mootools
Example:


Docu: –
Forum: –

Author: David Walsh - http://davidwalsh.name/smooth-scroll-mootools
wiki-Author: K.Heermann (flip-flop) http://planmatrix.de) 27.07.2011
CMS Version: >= 1.4.7 (r4xx)
Version: V1.0

Tag: –

filename:

  • template/lib/mootools/plugin-1.2/mootools.SmoothScrollToTop-1.2.js
  • template/lib/mootools/plugin-1.3/mootools.SmoothScrollToTop-1.3.js

Floder: template/lib/mootools/plugin-1.2 [plugin-1.3]

Condition:/config/phpwcms/conf.inc.php

  • $phpwcms['allow_cntPHP_rt'] = 1;
  • JS im Browser eingeschaltet


Desscription:

The JS code, the CSS file and the button image is stored in the directories listed above.

  • In the template please select at JS Library: mootools 1.2 oder 1.3.
  • In the template in “MAIN” initialize the JS-Plugins at some point.
    <!-- JS: SmoothScrollToTop-1.2 -->

    oder

    <!-- JS: SmoothScrollToTop-1.3 -->
  • The MooTools plugin “Fx.Scroll” und “Fx.SmoothScroll” must be loaded:
    <!-- JS: MORE:Fx/Fx.Scroll,Fx/Fx.SmoothScroll -->
  • At the top of the page the top anchor is set with
    <a id="top" name="top"></a>

    .

  • A call to the anchor is set with
    <a href="#top">

    . (This call will be generated automatically in each CP with the switch “Top-Link: [x]”).


Template:



JS-Code

Version for Mootools V1.2- und V1.3

File template/lib/mootools/plugin-1.2/mootools.SmoothScrollToTop-1.2.js
File template/lib/mootools/plugin-1.3/mootools.SmoothScrollToTop-1.3.js

mootools.back-to-top-1.2.js oder mootools.back-to-top-1.3.js

/**
 * --------------------------------------------------------------------------
 * smooooooth scrolling using mootools 1.2/3.x
 *
 * author: David Walsh - http://davidwalsh.name/smooth-scroll-mootools
 *
 * version:    1.0
 * released: Wednesday, April 23, 2008
 *
 * --------------------------------------------------------------------------
 */
 
//when the dom is ready
window.addEvent('domready',function() {
    //smooooooth scrolling enabled
    //new SmoothScroll({ options }, window);
    new Fx.SmoothScroll({ duration:600 }, window); //700 milliseconds to get there
});


Download

Version 1.0: smooth_scroll_to_top.zip (1.56 KiB, 52 downloads)


english/other-enhancements/mootools/smooth-to-top-anchor.txt · Last modified: 2011/07/29 14:28 by Knut Heermann (flip-flop)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 79