修复了chrome浏览器中的兼容性bug

This commit is contained in:
Li Jianxuan 2011-10-25 08:01:44 +00:00
parent 5ab5e4f2ef
commit 3cbdd0bf71
1 changed files with 7 additions and 13 deletions

View File

@ -50,18 +50,12 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
</div>
<script>
function loadmasonry(){
em = document.getElementsByClassName('thumb');
for(var i=em.length-1;i>=0;i--){
var p = em[i];
if(p.width < 1)
{
var timer = setTimeout("loadmasonry()",100);
return false;
}
}
$('#container').masonry({itemSelector: '.items',columnWidth : 210 });
}
loadmasonry();
var $tumblelog = $('#container');
$tumblelog.imagesLoaded(function(){
$tumblelog.masonry({
itemSelector: '.items',
columnWidth: 240
});
});
$(".items").mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")})
</script>