jquerypaginationhtml-lists

Pagination and filter script almost ready


@alex-r help me a lot with this but im getting a little issue. To understand what im trying to say please click in "category 1" link, now click into "next" until it hide, then click in "Category 3". Like you see the items doesn't show. I don't know if exist some way to go to the first item of the selected category or something that let it be shown.

Thanks for your time!


Solution

  • You'll need to reset the page to the first one whenever the category is reset.

    if (action == "first") {
        min = 0;
        max = itemsNumber;
    }
    

    Then in the click event handler, call the first action:

    pagination('first');
    

    Fiddle: http://jsfiddle.net/vU9Hv/17