Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Grid View / List View featuring Masonry

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #39161
    dnnot
    Member

    hi everyone,
    i’m sitting on this problem since 2 days.
    http://jsfiddle.net/DSk8D/

    first problem:
    why there is a big whitespace below the 1st Item of the grid-view? (maybe a css prob?)

    second problem:
    i want to implement jquery.masonry with the grid view but the jquery hook is wrong $(‘#products.grid‘).masonry({ ?
    only on refresh it works a bit – eh strange, maybe a cookie problem? i tried so many things but nothing worked.

    I will be very thankful for help.
    Sorry if it is in the wrong category.

    #107148
    Cwapface
    Participant

    As far as your first problem, you do have a bottom-margin set to 50px, which causes that whitespace below.

    .view {
    margin: 0 0 50px 0;
    }

    I am not very familiar with your masonry grid jquery plugin, but I will look into it. Maybe someone experienced with it will answer your question before I get back.

    #107151
    dnnot
    Member

    sorry, maybe I misspelled something . I mean the whitespace below the h1 of the red face ape.

    #107156
    dnnot
    Member

    sure, but a fixed height is not a good solution for it, if i have more content as the fixed height : / (the height could change by different lengths of blog-articles)

    #107159
    wolfcry911
    Participant

    You haven’t linked to the masonry plugin. The whitespace is how it renders with normal floats ( a float can’t be higher than a previous float by default).

    #107161
    dnnot
    Member
    #107163
    wolfcry911
    Participant

    my error, sorry. the rendering was standard css as if masonry wasn’t being applied

    #107165
    dnnot
    Member

    ah ok thank you, now I know it is a javascript problem.
    i must find a way to implement masonry correctly at the beginning and not after refresh : /

    #107209
    Taufik Nurrohman
    Participant

    Should work with reload and destroy method. But I check the console then show some errors :

    cannot call methods on masonry prior to initialization; attempted to call method 'reload'
    cannot call methods on masonry prior to initialization; attempted to call method 'destroy'

    http://jsfiddle.net/tovic/DSk8D/240/

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.