Jquery Pagination (Ref file: portfolio-jpagination)

2 replies · opened Jan 17, 2017

UusertempJan 17, 2017

Hello,

I am using portfolio-jpagination page as a reference for paging my portfolio items which is retrieved from database using ajax.

Pagination is not working.

My code which is being used to append div
<script>
$(document).ready(function () {

            $.ajax({
                    type: 'Post',
                    url: 'Test.aspx/GetCode',
                    contentType: 'application/json; charset=utf-8',
                    dataType: 'json',
                    success: function (response) {                                                    
                        var arr = JSON.parse(response.d);
                        var interview, namea, idno, location, link,video,value;
                        console.log(arr);                           
                        
                        var tableshow = document.getElementById("test");
                        for (index = 1; index &lt; arr.length; index++) {
                            interview = arr[index];
                     
                            video = interview[5];
                            if (video) {

                                $("#gallerydisplay").append('&lt;article  class="portfolio-item  pf-uielements  pf-icons"&gt;&lt;div class="portfolio-image"&gt;[

![attachment](images/placeholders/' + interview[0] + '.jpg)
](portfolio-single-video.html)<div class="portfolio-overlay">[ ](' + interview[3] + ') </div> </div> <div class="portfolio-desc"> <h3> ' + interview[4] + '</h3><span>' + interview[1] + ',' + interview[2] + '</span> </div></article>');

                            }

                            else {
                             
                                
                                $("#gallerydisplay").append('&lt;article class="portfolio-item pf-uielements pf-media"&gt;&lt;div class="portfolio-image"&gt;[

![attachment](images/placeholders/' + interview[0] + '.jpg)
](portfolio-single.html)<div class="portfolio-overlay">[](images/placeholders/' + interview[0] + '-big.jpg)</div></div><div class="portfolio-desc"><h3>' + interview[4] + '</h3><span>' + interview[1] + ',' + interview[2] + '</span> </div></article>');

                            }
                            SEMICOLON.initialize.lightbox();
                        
                        }
                      
                    },

                    failure: function (msg) {
                        $('#output').text(msg);
                    }
                });
            
               
          
            
        });
         &lt;/script&gt; 

Please let me know how I can fix the pagination issue. Thanks

UusertempJan 19, 2017

No one has yet replied me about the pagination issue. Please let me know. I need to wrap up pagination feature.

Thanks

UusertempJan 23, 2017

Hello, I am fetching data from database using JSOn ajax method. I am using Portfolio- JPagination.html as a working template. I have kept all the code and added just one javascript code to fetch data from the database using JSON in $(document).ready(function () {} method.

Pagination is not working. It is showing all the records in the single page only. Could you please let me know what am I missing or what needs to be done to fix the pagination.

Thanks

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard