[英]Magento Product Page scrolls down automatically
I use the magento kallyas theme and there must be some javascript that forces all my product pages to scroll down automatically. 我使用了magento kallyas主题,并且必须有一些JavaScript强制我的所有产品页面自动向下滚动。
This page: http://www.stainer-online.com/produkte/tische/altholztische/altholztisch-design-silbermine.html 本页: http : //www.stainer-online.com/produkte/tische/altholztische/altholztisch-design-silbermine.html
When you load this page, or reload it or choose a other product-detail-page your browser scrolls down. 加载或重新加载该页面或选择其他产品详细信息页面时,浏览器将向下滚动。
Which script or extension is this? 这是哪个脚本或扩展名? Themedevelopers cant help.
主题开发人员无法提供帮助。
Thanks for your help 谢谢你的帮助
probably this in fault in your js : 可能这是您的js错误:
jQuery.fn.center = function(pos){
if (! pos)
pos = 'fixed';
var w = jQuery(window);
this.css("position", pos);
if ('fixed' == pos){
this.css("top" , (w.height()-this.height())/2 + "px");
this.css("left", (w.width()-this.width()) /2 + "px");
} else if ('absolute' == pos){
this.css("top",(w.height()-this.height())/2+w.scrollTop() + "px");
if(w.height() < this.height())
this.css("top", w.scrollTop() + "px");
this.css("left",(w.width()-this.width())/2+w.scrollLeft() + "px");
}
return this;
}
Try not to force the top attribute in css, and maybe the position as well. 尽量不要在CSS中强制top属性,也不要在位置中强制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.