0

I don't know how to explain the problem by the words. So let me show some pictures:

I have a isotope plugin and over 100 thumbnails on the page.

  • Blue: page size
  • Green: menu
  • Red: footer
  • Grey: thumbnails / page content

When all the thumbnails are loaded, the page looks like that on all of the browsers (everything's fine and page is scrollable) :

a busy cat http://phillip.com.pl/sample/inne/defaulf-no-filter.jpg

When the thumbnails are filtered by isotope, and there's only a few thumbs left, the page looks like that on IE and Firefox (everything's fine - page isn't scrollable and the footer is at the bottom of the page) :

a busy cat http://phillip.com.pl/sample/inne/ff-ie-filter.jpg

Finally, when the thumbnails are filtered by isotope, and there's only a few thumbs left, the page looks like that on Chrome (layout is good, but the page is still scrollable as it was before isotope filter) :

a busy cat http://phillip.com.pl/sample/inne/chrome-filter.jpg

Is this a bug in chrome, or should I look at my js/css files ?

There's all the js for isotope:

<script src="/assets/js/jquery.isotope.js" type="text/javascript"></script>
<script type="text/javascript">
      $(function(){
        var $container = $('#grid-items');
        $container.imagesLoaded( function(){
            $container.isotope({
              itemSelector : '.pin',
              layoutMode : 'fitRows',

              getSortData : {
                  name : function( $elem ) {
                    return $elem.find('.name').text();
                  },
                  votescore : function( $elem ) {
                    return parseInt( $elem.find('.votescore').text(), 10 );
                  },
                  popularity : function( $elem ) {
                    return parseInt( $elem.find('.views').text(), 10 );
                  },
                  commentscount : function( $elem ) {
                    return parseInt( $elem.find('.comments_link').text(), 10 );
                  }
              }
        });
    });


    // SORTING:
    $('#sort-by a').click(function(){

        var sortBool;

        if($(this).find('i.icon-down_arrow').length != 0){
            if ($(this).hasClass('selected')) {
                $(this).find('i').removeClass('icon-down_arrow');
                $(this).find('i').addClass('icon-up_arrow');
                if($(this).hasClass('class_text')){
                    sortBool = true;
                }else{
                    sortBool = false;
                }
            }else{
                if($(this).hasClass('class_text')){
                    sortBool = false;
                }else{
                    sortBool = true;
                }
            }
        }else{
            if ($(this).hasClass('selected')) {
                $(this).find('i').removeClass('icon-up_arrow');
                $(this).find('i').addClass('icon-down_arrow');
                    if($(this).hasClass('class_text')){
                        sortBool = false;
                    }else{
                        sortBool = true;
                    }
                }else{
                    if($(this).hasClass('class_text')){
                        sortBool = true;
                    }else{
                        sortBool = false;
                    }
                }
            }
            var sortName = $(this).attr('href').slice(1);
            $('#sort-by a').each(function() {
                $(this).removeClass('selected');
            });
            $(this).addClass('selected');
            $container.isotope({ 
                sortBy : sortName,
                sortAscending : sortBool
            });
            return false;
        });

        // FILTERING:

        $('#filters a').click(function(){
            $('#filters a').each(function() {
                $(this).removeClass('selected');
            });
            $(this).addClass('selected');
            var selector = $(this).attr('data-filter');
            $container.isotope({ filter: selector });
            return false;
        });     
    });
</script>
Artur Filipiak
  • 9,027
  • 4
  • 30
  • 56

1 Answers1

1

In my experience, Isotope is (obviously) dependent on the mode you are using it in, and the values of that mode. Somethings work sometimes in some modes and not in others. I would comb the docs and look at your JS file to see what you can do. What mode are you using now?

http://isotope.metafizzy.co/docs/layout-modes.html

[EDIT] Try onLayout: function() {alert('onLayout callback')} on the line below layoutMode:'fitRows'.

nshoes
  • 143
  • 1
  • 8