修复了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> </div>
<script> <script>
function loadmasonry(){ var $tumblelog = $('#container');
em = document.getElementsByClassName('thumb'); $tumblelog.imagesLoaded(function(){
for(var i=em.length-1;i>=0;i--){ $tumblelog.masonry({
var p = em[i]; itemSelector: '.items',
if(p.width < 1) columnWidth: 240
{ });
var timer = setTimeout("loadmasonry()",100); });
return false;
}
}
$('#container').masonry({itemSelector: '.items',columnWidth : 210 });
}
loadmasonry();
$(".items").mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")}) $(".items").mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")})
</script> </script>