jeudi 24 septembre 2015

Infinity Scroll Plugin not work with bootstrap row

I don't know how to add bootstrap row with Infinity Scroll plugin. Here is code :

$('.pages').infinitescroll({
    loading : loading_options,
    navSelector     : ".pager",
    nextSelector    : ".pager a:last",
    itemSelector    : ".pageitem",
    debug           : false,
    dataType        : 'html',
    path: function(index) {
        return "?page=" + index;
    }
}

it loads result but like this in image.

can't upload image because have no reputation but you can see in this link : Image Error

You can see result i generated pages with laravel and it's works fine using array_chunk() but when i do scroll infinity scroll not loads in row it just include col-md.

Any solution how to load row ?

Laravel Code :

$cats = Category::simplePaginate(12);

HTML Code :

<article class="col-md-9 no-margin pages">
        <h4 class="heading">Site Categories</h4>
        @foreach(array_chunk($cats->getCollection()->all(), 3) as $cat)
            <div class="row">
                @foreach($cat as $category)
                    <article class="col-md-4 image-list add-margin add-border-bottom pageitem">
                        <a href="/Items/{{$category->name}}/{{ $category->id }}">
                            <img class="thumbimg no-margin"
                                 src="/images/uploads/thumbs/{{ $category->image = "" ? "/images/no.gif" : $category->image }}"
                                 onerror="imgError(this)" alt=""/>
                        </a>

                        <p class="categories-subcategories-margin">{{ $category->name }}</p>
                        <a href="#" class="readmore categories-subcategories-margin">Read More...</a>
                    </article>
                @endforeach
            </div>
        @endforeach
    </article>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire