Date: Thu, 28 Mar 2024 19:05:34 %+0100 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: | {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}
{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.