- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Tumblr: NewDayDate + Masonry
Hello!
I’m trying to create a template for tumblr. You can look it here. So I want divide posts by NewDayDate and use masonry to arrange them. I looked at this tutorial and that’s fine. But how you can see something is wrong. The date div doesn’t appear in block.
In short this is my code:
CSS:
.post { width:880px; } .date { width:880px; border-bottom: 1px solid #000; display: block; height:40px; } .post.author1post { width: 400px; float:left; } .post.author2post { width: 400px; float:right; }
BODY:
— div class post {block:Posts} {block:NewDayDate}
{/block:NewDayDate}
{/block:Posts}
SCRIPT:
$(window).load(function () { var $tumblelog = $(‘.mas‘);
function (newElements) {
var $newElems = $(newElements).css({
opacity: 0
});
$newElems.imagesLoaded(function () {
$newElems.animate({
opacity: 1
});
$tumblelog.masonry('appended', $newElems);
});
});
$tumblelog.imagesLoaded(function () {
$tumblelog.masonry({
columnWidth: function (containerWidth) {
return containerWidth / 100;
}
});
});
})();
Can you help me please? Thanks.