jQuery masonry插件 - 有麻烦获得divs在IE7正确堆叠 [英] jQuery masonry plugin - Have trouble getting the divs to stack properly in IE7

查看:129
本文介绍了jQuery masonry插件 - 有麻烦获得divs在IE7正确堆叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题的Masonry插件jQuery。

I have a problem with the Masonry plugin to jQuery.

如果您查看此链接: http ://iloveinternet.org/kunder/omk/ ,向下滚动到棕色字段,顶部有粉红色的线条。你能看到那些div框吗?他们应该堆叠在彼此相邻的三排与砖石插件。这在大多数浏览器工作正常,除了IE7在windows XP中并行在我的mac。

If you take a look at this link: http://iloveinternet.org/kunder/omk/ and scrolls down to the brown field with a pink line on top. Can you see the div boxes there? They are supposed to be stacked next to eachother in rows of three with the masonry plugin. This works fine in most browsers except from IE7 in windows XP in parallels on my mac.

有人知道我在做什么吗?是不好的html kode还是它在脚本中的东西?

为什么...如果你可以检查,如果你在IE中遇到同样的问题

By the why... if you could check if you experience the same problem in IE or not, it would be great to know.


  • 谢谢:)

推荐答案

您的脚本在index.php的第36行上导致一个错误,其中document.location.hash是一个空字符串。
不确定这将解决列问题,但最好从一个工作页面开始之前,试图调试布局/ css问题。

Your script is causing an error for me on line 36 in index.php where document.location.hash is an empty string. Not sure that this will fix the column issue but better begin with a working page before trying to debug layout/css issues.

var destination = $( document.location.hash ).offset().top;

尝试这样:

var $el = $( document.location.hash );
var destination = 0;

if ( $el.length ) {
   destination = $el.offset().top;
} 

$("html:not(:animated),body:not(:animated)").scrollTop( destination );

这篇关于jQuery masonry插件 - 有麻烦获得divs在IE7正确堆叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆