Git Product home page Git Product logo

jpages's People

Contributors

luis-almeida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpages's Issues

Change layout of pagination controls?

The pagination controls as they stand are just a list of links. Would it be possible to add functionality to populate an unordered list? Bootstrap has a good pagination style and this script is great but needs some serious tweaking to get it working correctly.

Other version of Jquery

Hi there,

Just wanted to ask if the newer version of jquery will work on this plugin? if yes can you teach me how to do it. I tried adding this in wordpress and it is having a conflict with jquery built in wp which is a newer version.

I tried the jpages plugin but it does not work and I want to have more control.

Thanks

Implement "1 - 10 of 40 Items"

Can someone give a clue on how to do something like "1 - 10 of 40 Items".
I think this would be a pretty common use case.

Thanks,

assign class to a elements in holder

Hi,

I've noticed that a elements inside .holder div haven't any class.
I was wondering if there is any way to customize this thing initializing the jPages plugin.
Something like the data-title behavior... but with a data-classes attribute for example.

Thanks anyway
Best regards
Carlo

Jump to pages with text links

Hi there

I'm trying to create a simple link to a page outside of the jPages navigation. I see that there is a jump to method using numerical page values using 'parseInt'

$("button").click(function(){
/* get given page /
var page = parseInt( $("input").val() );
/
jump to that page */
$("div.holder").jPages( page );
});

but is there something similar that can be implemented with text strings using split text and an anchor point instead of an input field?

Pagination not working if not in active tab?

Trying to use jPages on a page with standard bootstrap tabs. The pagination doesn't seem to work if it is located in one of the hidden tabs but does work if it's in the active tab.

Any reason this would be or fixes for it?

Minimum height default setting

This is more of an issue with the default settings but I couldn't figure out why the UL containing my list was extending to the height of all of the contents that were being paginated.

Basically on page load the UL would be sized properly for a second and then it would increase in height and extend to the height of the actual content. Each time I clicked through to a page the new li would show up but further down the page.

Oddly, this didn't happen if I set the start page to anything other than 1.

So after a bit of troubleshooting and removing all of the css in my project I realised there was a minimum-height being set in the js and once I set that to false in the options the pagination starting displaying properly.

This didn't happen with the demo site so I'm not entirely sure what the difference was but this might help someone else facing the same issue.

Thanks a lot for this script - it's excellent.

error after 1740 items

In my paginção more than 1740 records, and I realized that after this many items, paging stops working,
What can be happening? how to fix this "error"

Thank you!

clash with tabs in bootstrap

Hi,

i am using this for images list inside a bootstrap tab, on the fist page it is working for other tabs it is not working, i could not understand where the problem lies can you please help me in this issue, i think it may because of js calsh, if yes, let me know what is the solution

Thank you
Karthik

Jump to top when clicking next.

Dear Sirs,

I use jpages, i like the script, but i have one question:

If i click next or previous in my navigation, i want to jump to the top of te page, is that possible?

thx in advance!

IE8 not showing content

Hi
I have been working on this for a few hours and no luck at all.
jPages works in all browsers, except IE8.

Works fine for me on IE7, IE9 but not 8

When I try to paginate, only show the first item of the array/content.
If I disable, my content shows.

Any help on this?

Thanks

Losing items after changing items per page

The issue can be replicated even on the project's demo page here:
http://luis-almeida.github.com/jPages/itemsperpage.html

If you change items per page a couple of times (and change the viewing page some times too) you will start to permanently lose some list items which never get visible again.

My guess is that the new function to ignore hidden items on the item count is causing this, so when you have changed to eg page 2/20 then change items per page to something else, the moment jpages re-initializes the items of page 1 are hidden, thus are not counted toward the total.

Thanks for the great plugin btw :)

avoid repeating information

hi, is there any way i can avoid repeating information?

i mean:

html5 "data-" has an information ex:

<li data-director="spielberg">

..and then.. i'm retyping it..:

<span>Director: <i>spielberg</i></span>

i'm using it over github so no variables available..

any way to avoid repeating everything?

thanks!

stop on mouse hover

how do I go when the mouse, slide stop? I want him going, but when mousing, would have to stop

Not all the table row is showing

I've got an issue in table, not all row is showing.
ex.
you add 6 rows data and i set perPage to 5,
now it will have 2 pages but if i add another row: that row will not show.

Another is when i select page 2 then i add another row,
the pages is resetting to 1 and remains 2 rows.

please check it here: http://jsfiddle.net/joemarvalete/v9kuf/2/

jquery pagination not work after ajax load

I have applied pagination with jPages plugin.
Pagination works fine for the first time along with search input. But when you change the filters on the right side, pagination has disappear.

any one can give solution.

in HEAD ||

<script> $(function() { $("div#lazy img").lazyload({ event : "scroll", effect : "fadeIn" }); ``` $("div.holder").jPages({ containerID : "itemContainer", animation : "fadeInUp", callback : function( pages, items ){ items.showing.find("img").trigger("turnPage"); items.oncoming.find("img").trigger("turnPage"); } }); ``` }); $.ajax({ url: 'your ajax page url', type: 'Either POST or GET', data: 'Data to be sent to ajax page', }) ## </script>

in body||

Show All Waiting Payment Confirmed Completed Cancel

// my ajax content call
//jpages MY DATA MY DATA

my js.php
function getData()
{
var filter = document.getElementById("filter").value;
var tfq = document.getElementById("tfq").value;
var variabel ='code_ax.php?filter='+filter+'&tfq='+tfq;
request.open('get',variabel);
request.onreadystatechange = parseGetData;
request.send('');
}

function parseGetData()
{
if (request.readyState == 4)
{
var answer = request.responseText;
document.getElementById("LISTDATA").innerHTML = answer;
}
}


code_ax.php

MY REQUEST DATA MY REQUEST DATA

Problem with dynamicaly created content

I'm loading image thumbs from flickr.
When all the info from flickr is loaded (callback response), unordered list is created, after that jpages plugin is instantiated.
But it seems that the plugin is not aware of the list elements (children - thumbs) inside the container.
It fires the callback, but there are no items in the items object, although if i query the container element directly inside the callback via jquery it gives me all the children of the container.
The workaround that I'm currently using is setTimeout (fired 1000ms after flickr callback)
If I delay running the plugin , then it works.

Also, strange thing it works when loading from cache.

Hidden Pagination if limit hasnt been reached

Hi there,
I might be missing something but I couldn't see if there was a way for the pagination to be hidden until the page has reached the limit. i.e if you're paginating reviews and there have been 3 so far and you've set the limit per page to 5 the pagination navigation should not appear, once its passed 5 and a second page is necessary then the pagination navigation should appear. Is this an option.

Other than that great work, cheers.

Doesn't respect element item's display property rule

In my responsive layout, I have the items changing their 'display' rule: when on desktop it's 'display: table-row' and on mobile it is 'display: block'.

however, the plugin only seems to recognize the 'display' property on load and maintain it through out, so when the user resizes the window the 'display' property that should have changed is not changing, so the layout becomes a mess after that.

Events

Hi ! I'm currently working on a project and I'm using jPages.
This is a very good plugin for sure, quite simple and efficient nevertheless is there any events ?
I'd like to launch a function everytime I'm displaying a page and an event would be very great.

Thanks !

Destroy not unbinding navigation links

Hi Luis, and first of all thanks for those two great plugins (jPages and Filtrify).

We are using both of them on the same page and therefore need to constantly destroy and reload the pagination.
We had some issues when this scenario is combined with external "next" and "previous" links: after the first destroy-reload, the navigation starts to act strangely.

I've been tracking down the cause and it seems to me that this is due to the destroy method not unbinding the events on the navigation links. I just added the following lines to it and the problem seems to be gone:

        this._next.unbind("click.jPages").empty();
        this._previous.unbind("click.jPages").empty();

Abraço,

Julien

Add git tags

Hi @luis-almeida ,
We found that the repo doesn't have any release. Could you please add git tags so that the git auto-updater in cdnjs can recognize the correct version and automatically update the repo?
Thank you.

cdnjs/cdnjs#8046

why only show two pages

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

  <title>table</title>
  <link rel="stylesheet" href="css/jPages.css">

  <script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
  <script src="js/jPages.js"></script>

  <script type="text/javascript">
    $(function(){
        var vennum =1;
        var vnum = 0;
        var crtpages = 1;
        $("a.addVenn").bind("click",function(){
                    vnum++;
                    vennum++;
                    var indexV = $("#tableV tbody tr").length;
                    var indexVs = "Venn" + vennum;
                    var innerVh = "<tr><td class='cawid'<input type='checkbox' class='checkV'></td>";
                    innerVh += "<td>" + indexVs + "</td>";
                    innerVh += "<td><input type='text'/></td>";
                    innerVh += "</tr>";
                    $("#tableV tbody").append(innerVh);
                    if((indexV%2)==0){
                        crtpages += 1;
                        mypages(crtpages);
                    }
                });
    });
    var mypages = function (currentPages){
     $("div.holder").jPages({
      containerID : "abc",
      previous : "上一页",
      next : "下一页",
      perPage : 2,
      midRange:5,
      delay : 0,
      callback:function(pages, items){
        console.log("当前页面:" + pages.current);
        console.log("页面总数:" + pages.count);
        console.log("总数量:" + items.count);
      }
    });
     var page = parseInt( currentPages );
    $("div.holder").jPages( page );
};

  </script>
 </head>
 <body>
    <a href="javascript:void(0);" class="addVenn">添加</a>
    <table id="tableV">
                                        <thead>
                                            <tr>
                                                <th">
                                                    <label>
                                                        <input type="checkbox" name="vennCheckAll" id="checkAllV"/>
                                                    </label>
                                                </th>
                                                <th>title</th>
                                                <th>content</th>
                                            </tr>
                                        </thead>
                                        <tbody id="abc">
                                            <tr>
                                                <tdclass="cawid"><input type="checkbox" class='checkV'></td>
                                                <td>Venn1</td>
                                                <td>
                                                    <input type='text'/>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <div class="holder"></div>

</body>
Why run results show only two pages?

< and > as next/previous does not work...

I need to use < and > for the next/previous links, but any time I put them in it breaks the script. Are there any solutions for this?

I have tried using "&lt" and "<" and "&#60" with no success...

Jpages and Youtube iframe

Hi,
first of all, thank you so much for this plugin, it's amazing!

then, a little problem..I am using it with youtube iframe. When I change pages videos change but sometimes when i go with the mouse over one video it will change back to the video on another page.

Please can you fix it?

thank you!!

<iframe width="264" height="160" src="http://www.youtube.com/embed/aaa" frameborder="0" allowfullscreen></iframe> lab1

Items count and AJAX problem

Hi,
your plugin is one of the most amazing ones i have seen on net, but i am having big problem, it seems that your plugin works after the DOM elements are loaded, in other word it just hides the full number of elemnts and create paging numbers out of them, and in this way you cant set number of pages,
what i mean is i want to do simple ajax request to get records from DB, where i have forexample 100 records and i want to return 10 per request, so i will naturally end up with 10 pages numbers with your plugin, but sadly it does not work :(

any hint i would totally appreciate it.

thanks in advanced.

Problem while implementing along with "Isotop jQuery"

I have successfully implemented and tested all functionality of "jPage" in my wordpress page. Now I am trying to implement it along with Isotop jquery. I can see there is no conflict between those two jQuery scripts,both are working on my page without any error in firebug error console. But problem is that while loading my page all images and css animation are loading on first Image (first: li item area only) and overlaps all Images on first:li instead of displaying all over div block. definitely this is css error. As I found both scripts working with CSS3 "Transform" property. I tried with removing all animation with transform in animate.css and then its works well. But now I cant use other css animation with Transform property. Is there any solution to overcome this conflict of Transform property in both scripts?

new value for links

Hi
I'm reading your jPages plugins to help a friend.
He had the need to hide the navigation and use only next and prev.

Well, I modified
linha 21:
links: "numeric", // blank || title
to
links: "numeric", // blank || title || none

linha 122:
var navhtml = this.writeNav();
to
var navhtml;
if ( this.options.links != "none") {
navhtml = this.writeNav();
}

In test worked well ...

Thanks in development.

Nice work.

Show all

How i can create button "Show all" which shows all elements?

Browser history bug

Hi Luís, first of all sorry for my english.

Your plugin is GREAT!!!

Only one "bug"... the lack of browser history.

If I have multiple page in navigation holder, browser back button don't work.

Is possible to add the hashchange function at your plugin?

If yes, how?

Do you can makes me an example of the code to use?

Thanks for your work! ;-)))

Maximo.

Disable animation in Options

Is there a way to disable animations in Options setup?

$("div.holder").jPages({
containerID : "itemContainer"
});

I'd like to disable all animations in one case and leave animations as it is in another case. Basicaly I'd like to setup JPages by 2 different ways:

  1. Basic setup

$("div.holder").jPages({
containerID : "itemContainer"
});

  1. Setup without animations

$("div.holder").jPages({
containerID : "itemContainer",
animation:none,
jqueryanimation:none
});

I'd appretiate the other way of disabling animations too!

How to show only previous and next title link

Hello,
I try to show only the previous and next item link (with title links) instead of previous and next function.

I play with the startRange, midRange, endRange but i can't find the right combination.

(Sorry for my english)

HTML entities previous and next

If you want to set the pervious and next to an HTML entity you will get an error.

The javascript:

                            $('div.pagination').jPages({
                                containerID : 'itemHolder',
                                perPage : 9,
                                previous : '&lsaquo;',
                                next : '&rsaquo;'
                            });
                        });

And the error inside jQuery 1.7.2 (it also happens in 1.7.1):

Syntax error, unrecognized expression: ‹

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.