brunjo / rowGrid.js

A small, lightweight JavaScript plugin for placing items in straight rows (jQuery and vanilla JS version) – Demo:
http://brunjo.github.io/rowGrid.js/
MIT License
670 stars 78 forks source link

Sometimes I need to refresh the page to see the effect #13

Closed bbt-mahfuz closed 10 years ago

bbt-mahfuz commented 10 years ago

Hi,

Thanks for such a good plugin. It works fine. But sometimes the items are not properly margined and placed. I need to refresh it to see it ok.

What could be the reason? any idea? Do we have to apply it after all the images are loaded or something. Thanks in advance for your help.

Mahfuz

brunjo commented 10 years ago

Hey,

if you added the width and height attributes to your image tags it should work without waiting till the images are loaded. But if the image tags have no size attributes you have to wait till they are loaded and then call the rowGrid.js method.

Bruno

bbt-mahfuz commented 10 years ago

Thanks Bruno for your reply. It really helped me. I am getting another issue. Sometimes the last item of the last row is pushed to the next row thought there is some blank space at the end of last row. And the top of the last image touches the bottom of the images of its upper row. Basically the image should be shown at the end of the row but for some reason it is pushed down.

Could you please shed some light on it.

Thanks.

brunjo commented 10 years ago

Could you provide an online example or at least a screenshot?

bbt-mahfuz commented 10 years ago

I am using the plugin and developing a site. You can see one example in the dev site by following this link: http://pixipic.bbtdevelopment.com/home/RefineSearchForm?Gender%5BBoy%5D=Boy&action_refinedResults=Search

brunjo commented 10 years ago

I hope the new version of rowGrid.js solves this problem.