Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column classes are not being added to the columns #2

Open
dethfactor opened this issue Jul 23, 2013 · 4 comments
Open

column classes are not being added to the columns #2

dethfactor opened this issue Jul 23, 2013 · 4 comments

Comments

@dethfactor
Copy link

I've been trying to use waterfall on a tumble feed and the master build doesn't add the column classes. I ended up pulling the '.js' from the demo on the site which works.

var $container = $('#list');
            $('#wrapper').css('visibility','hidden');
            $container.imagesLoaded(function(){
                $container.waterfall({
                    colClass: 'content-column', 
                });
                $('#wrapper').css('visibility','visible');

   });
@dy
Copy link
Member

dy commented Jul 24, 2013

Yes, in the new version of waterfall I’ve decided to avoid redundant columns, simply placing items to the container with position: absolute. That allows to make spanning items, animate repositioning, avoid excessive calculations on reflow & add and ease appending new items by simply placing them to the container without calling add. Just as if you placed them without waterfall.
So waterfall now behaves just like layout, not appending anything excessive.
Now colClass used if you have content prerendered to the columns: it will parse the content from columns with colClass, then remove columns and place items instead of them.

Docs will be updated soon.

@Alex-Sokolov
Copy link

I also using this feature for 2-columns timeline.
Now I separate items that way:

$('.waterfall-item').each(function() {
    var $this = $(this);

    if ($this.position().left == 0) {
        $this.addClass('left-column');
    } else {
        $this.addClass('right-column');
    }
});

Maybe this will be useful for you

@dy
Copy link
Member

dy commented Sep 23, 2013

I can assign classes to items according to their columns, if you wish.

@Alex-Sokolov
Copy link

If you can, that will be great)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants