Date: Fri, 8 May 2026 12:05:49 %+0200
Mime-Version: 1.0 (Produced by Tiki)
Content-Type: application/x-tikiwiki;
  pagename=Back%20To%20Top;
  flags="";
  author=luci;
  version=26;
  lastmodified=1605105169;
  author_id=5.149.250.222;
  summary="";
  hits=4988;
  description="";
  charset=utf-8
Content-Transfer-Encoding: binary

{DIV(class=)}__[https://profiles.luciash.eu/tiki-index_p.php?page=Profile Details&itemId=97|Profile Data Details|box]__{DIV}
!! Back To Top (version 0.4.3)
''Back To Top'' installs and assigns a module featuring a "back to top" arrow.

!! Screenshots
::{img src="http://profiles.luciash.eu/display2" thumb="y" width="320" rel="box" title="How it looks like"}::

!! Known Issues & Limitations

!!- Fixed Issues
* --[item5640|Does not work in jQuery-UI mobile mode]--

!! Installation & Update
To add this Profile repository to your Tiki add the line below to your Admin (Control Panels) → "Profiles" → "Advanced" tab → "Repository URLs" text area:
https://profiles.luciash.eu/profiles

If you do an __update__ please do not forget to unassign the previous version in Modules, otherwise you will end up with multiple modules applied.
From your ''Tiki'' → ''Admin home'' → ''Profiles'' admin panel by hitting the __Apply Now__ button (or __Forget and Re-apply__ to update) the following YAML code will be applied:

{CODE(caption="YAML" colors="yaml" ln="1")}
objects:
 -
  type: module
  data:
   name: Back To Top 0.4.3
   position: bottom
   order: 1
   params:
    nobox: y
   custom: |
    <style type="text/css">{literal}
    .backtotop {
        bottom: 3rem;
        position: fixed;
        right: 3rem;
        z-index: 1;
    }
    .backtotop a:after {
        border-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(255, 255, 255, 0.5);
        border-style: none solid solid;
        border-width: 0 1rem 1.5rem;
        content: "";
        display: block;
        left: 0.5rem;
        position: absolute;
        top: 0.6rem;
    }
    .backtotop a {
        background: none repeat scroll 0 0 rgba(0, 0, 0, 0.25);
        border-radius: 12.8rem !important;
        color: rgba(255, 255, 255, 0.5);
        display: block;
        font-size: 400%;
        height: 3rem;
        line-height: 58%;
        margin-right: 0;
        overflow: hidden;
        position: relative;
        text-align: center;
        text-decoration: none;
        text-indent: -999rem;
        width: 3rem;
    }
    .backtotop a:active, .backtotop a:focus {
        outline: none;
    }
    {/literal}</style>{jq}{literal}
    $('.backtotop').hide();
    function backtotop(){
        var scrolled = $(window).scrollTop();
        if (scrolled > 0) {
            $('.backtotop').fadeIn();
        } else {
            $('.backtotop').fadeOut().removeAttr('style');
        }
    }
    $(window).scroll(function(e){
        backtotop();
    });
    $('.backtotop a').click(function(event){
        event.preventDefault();
        $('html,body').animate({
            scrollTop:$('body').offset().top
        }, 1000);
    });
    {/literal}{/jq}<div class="backtotop"><a href="#top" title="Back To Top">⌅</a></div>
{CODE}

!! Usage
This profile creates a custom module with a link "Back To Top" of the page. It will put the jQuery Smarty block code in it which is contained within the profile's "custom:" part in the YAML code to the module body. The module will be assigned to the ''bottom'' zone.
A triangle pointing up in a semi transparent circle should appear near the bottom right edge of the viewport. Clicking it will scroll the page back to top if you scrolled down a bit.

!! Uninstall
Just un-assign and delete the module on the ''[tiki-admin_modules.php|Admin → Modules]'' page.
