No, you only need the newer version. I can tell a difference in the speed. You currently have it set to 1000, as I said previously, keep increasing it until you are happy with the scroll speed.should i have both js file uploaded, anyway, i did still no change in speed.
Then you are doing something wrong with the update.without the 1.4.3 it would not scroll at all.
<templates>
<template title="back_to_top" version_id="11" version_string="1.0.3a"><![CDATA[<div class="back_to_top">
<xen:require css="back_to_top.css" />
<xen:require js="js/jquery/jquery.scrollTo-1.4.6-min.js" />
<script type="text/javascript">
jQuery.fn.topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: {$xenOptions.back_to_top_fadespeed},
ieOffset: 50
}, settings);
return this.each(function() {
//listen for scroll
var el = $(this);
el.css('display','none'); //in case the user forgot
$(window).scroll(function() {
if(!jQuery.support.hrefNormalized) {
el.css({
'position': 'absolute',
'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
});
}
if($(window).scrollTop() >= settings.min)
{
el.fadeIn(settings.fadeSpeed);
}
else
{
el.fadeOut(settings.fadeSpeed);
}
});
});
};
$(document).ready(function() {
$('#top-link').topLink({
min: 400,
fadeSpeed: {$xenOptions.back_to_top_fadespeed}
});
//smoothscroll
$('#top-link').click(function(e) {
e.preventDefault();
$.scrollTo(0,{$xenOptions.back_to_top_scrollspeed});
});
});
</script>
<a href="#top" id="top-link">{xen:raw $xenOptions.back_to_top_text}</a>
</div> ]]></template>
What is the version shown in the ACP for this add-on?i am just updating the xml file as needed. there is only one way to do it.
<div class="back_to_top">
<style type="text/css">
<xen:if is="{$xenOptions.back_to_top_responsive} == '0'">
<xen:if is="{$xenOptions.back_to_top_custom_minwidth} == '1'">
@media (min-width:{$xenOptions.back_to_top_minwidth})
<xen:else />
@media (min-width:@nonResponsiveMinWidth)
</xen:if>
{
</xen:if>
#top-link {
display:none;
position: fixed;
bottom: {$xenOptions.back_to_top_bottom}px;
right: {$xenOptions.back_to_top_right}px;
cursor: pointer;
outline: none;
padding: 1px 1px;
height:65px;
width:65px;
font-size: 1em;
font-family: '{$xenOptions.back_to_top_font}', Helvetica, Arial, sans-serif;
text-decoration: none;
background: {$xenOptions.back_to_top_background}; opacity: 0.75;
color: {$xenOptions.back_to_top_color} !important;
z-index:1;
-moz-box-shadow: 0 0 5px #888;
-webkit-box-shadow: 0 0 5px#888;
box-shadow: 0 0 5px #888;
}
<xen:if is="{$xenOptions.back_to_top_responsive} == '0'">
}
</xen:if>
</style>
<xen:require js="js/jquery/jquery.scrollTo-1.4.3.1-min.js" />
<script type="text/javascript">
jQuery.fn.topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: {$xenOptions.back_to_top_scrollspeed},
ieOffset: 50
}, settings);
return this.each(function() {
//listen for scroll
var el = $(this);
el.css('display','none'); //in case the user forgot
$(window).scroll(function() {
if(!jQuery.support.hrefNormalized) {
el.css({
'position': 'absolute',
'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
});
}
if($(window).scrollTop() >= settings.min)
{
el.fadeIn(settings.fadeSpeed);
}
else
{
el.fadeOut(settings.fadeSpeed);
}
});
});
};
$(document).ready(function() {
$('#top-link').topLink({
min: 400,
fadeSpeed: {$xenOptions.back_to_top_fadespeed}
});
//smoothscroll
$('#top-link').click(function(e) {
e.preventDefault();
$.scrollTo(0,1000);
});
});
</script>
<a href="#top" id="top-link"><img src="http://www.mysite.com/community/arrow1.png"></a>
</div>
<templates>
<template title="back_to_top" version_id="11" version_string="1.0.3a"><![CDATA[<div class="back_to_top">
<xen:require css="back_to_top.css" />
<xen:require js="js/jquery/jquery.scrollTo-1.4.6-min.js" />
<script type="text/javascript">
jQuery.fn.topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: {$xenOptions.back_to_top_fadespeed},
ieOffset: 50
}, settings);
return this.each(function() {
//listen for scroll
var el = $(this);
el.css('display','none'); //in case the user forgot
$(window).scroll(function() {
if(!jQuery.support.hrefNormalized) {
el.css({
'position': 'absolute',
'top': $(window).scrollTop() + $(window).height() - settings.ieOffset
});
}
if($(window).scrollTop() >= settings.min)
{
el.fadeIn(settings.fadeSpeed);
}
else
{
el.fadeOut(settings.fadeSpeed);
}
});
});
};
$(document).ready(function() {
$('#top-link').topLink({
min: 400,
fadeSpeed: {$xenOptions.back_to_top_fadespeed}
});
//smoothscroll
$('#top-link').click(function(e) {
e.preventDefault();
$.scrollTo(0,{$xenOptions.back_to_top_scrollspeed});
});
});
</script>
<a href="#top" id="top-link">{xen:raw $xenOptions.back_to_top_text}</a>
</div> ]]></template>
<template title="back_to_top.css" version_id="11" version_string="1.0.3a"><![CDATA[<xen:if is="{$xenOptions.back_to_top_responsive} == '0'">
/* stops the div being displayed if we aren't generating the button */
#top-link {
display:none;
}
/* Allows custom min-width to be set */
<xen:if is="{$xenOptions.back_to_top_custom_minwidth} == '1'">
/* Set custom width from option */
@media (min-width:{$xenOptions.back_to_top_minwidth})
<xen:else />
/* or use default {xen:property nonResponsiveMinWidth} Value */
@media (min-width:{xen:property nonResponsiveMinWidth})
</xen:if>
{
</xen:if>
#top-link {
display:none;
position: fixed;
bottom: {$xenOptions.back_to_top_bottom}px;
right: {$xenOptions.back_to_top_right}px;
cursor: pointer;
outline: none;
padding: 3px 5px;
font-size: 1em;
font-family: '{$xenOptions.back_to_top_font}', Helvetica, Arial, sans-serif;
text-decoration: none;
background: {$xenOptions.back_to_top_background}; opacity: 0.75;
color: {$xenOptions.back_to_top_color} !important;
z-index:1;
box-shadow: 2px 2px 5px #888;
border-radius: 2px;
}
/* In responsive, use standard placement for button */
<xen:if is="{xen:property enableResponsive}">
@media (max-width:{xen:property maxResponsiveMediumWidth}) {
#top-link {
bottom: 10px;
right: 10px;
}
}
</xen:if>
/* close off @media */
<xen:if is="{$xenOptions.back_to_top_responsive} == '0'">
}
</xen:if>]]></template>
</templates>
Sure, go for it.uninstall and reinstall perhaps?
We use essential cookies to make this site work, and optional cookies to enhance your experience.