Top Button Help

Matthew2D

Well-known member
When I hit the top button at the bottom, I want to to scroll to the top. Anybody have any idea how to do that?

Thanks!
 
Admin CP -> Appearance -> Templates -> footer

Change the red piece:

Rich (BB code):
			<ul class="footerLinks">
			<xen:hook name="footer_links">
				<xen:if is="{$xenOptions.contactUrl.type} === 'default'">
					<li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
				<xen:elseif is="{$xenOptions.contactUrl.type} === 'custom'" />
					<li><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'}>{xen:phrase contact_us}</a></li>
				</xen:if>
				<xen:if is="{$homeLink}"><li><a href="{$homeLink}">{xen:phrase home}</a></li></xen:if>
				<li><a href="{$requestPaths.requestUri}#navigation">{xen:phrase go_to_top}</a></li>
				<li><a href="{xen:link forums/-/index.rss}" rel="alternate" class="globalFeed" target="_blank"
					title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}">{xen:phrase rss}</a></li>
			</xen:hook>
			</ul>

Like so:

Rich (BB code):
			<ul class="footerLinks">
			<xen:hook name="footer_links">
				<xen:if is="{$xenOptions.contactUrl.type} === 'default'">
					<li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
				<xen:elseif is="{$xenOptions.contactUrl.type} === 'custom'" />
					<li><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'}>{xen:phrase contact_us}</a></li>
				</xen:if>
				<xen:if is="{$homeLink}"><li><a href="{$homeLink}">{xen:phrase home}</a></li></xen:if>
				<li><a href="{$requestPaths.requestUri}#headerMover">{xen:phrase go_to_top}</a></li>
				<li><a href="{xen:link forums/-/index.rss}" rel="alternate" class="globalFeed" target="_blank"
					title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}">{xen:phrase rss}</a></li>
			</xen:hook>
			</ul>

That will anchor to the header area which is the very top of the page for most users (unless there is a moderator bar or login bar present).

Or you can use javascript. Add the red code:

Rich (BB code):
			<ul class="footerLinks">
			<xen:hook name="footer_links">
				<xen:if is="{$xenOptions.contactUrl.type} === 'default'">
					<li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
				<xen:elseif is="{$xenOptions.contactUrl.type} === 'custom'" />
					<li><a href="{$xenOptions.contactUrl.custom}" {xen:if {$xenOptions.contactUrl.overlay}, 'class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"'}>{xen:phrase contact_us}</a></li>
				</xen:if>
				<xen:if is="{$homeLink}"><li><a href="{$homeLink}">{xen:phrase home}</a></li></xen:if>
				<li><a href="{$requestPaths.requestUri}#navigation" onclick="self.scrollTo(0, 0); return false;">{xen:phrase go_to_top}</a></li>
				<li><a href="{xen:link forums/-/index.rss}" rel="alternate" class="globalFeed" target="_blank"
					title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}">{xen:phrase rss}</a></li>
			</xen:hook>
			</ul>
 
Top Bottom