jQuery masonry plugin - Have trouble getting the divs to stack properly in IE7

自闭症网瘾萝莉.ら 提交于 2020-01-17 03:43:08

问题


I have a problem with the Masonry plugin to jQuery.

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.

Does anyone know what I´m doing wrong? Is it bad html kode or is it something in the script?

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

  • Thank you :)

回答1:


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;

Try something like this:

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

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

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


来源:https://stackoverflow.com/questions/1188307/jquery-masonry-plugin-have-trouble-getting-the-divs-to-stack-properly-in-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!