Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't find "isString()" where is the function defined in pagination.js ? #79

Closed
zlongxiang opened this issue Sep 25, 2018 · 2 comments

Comments

@zlongxiang
Copy link

when I look the pagination.js code in #69 has the 'isString( )' function, but I can't find where it defined. I look for this function because the parameter "totalNumberLocator" is not effective when I use dataSource's type is string. May you can help me! Thank you!

@zlongxiang
Copy link
Author

I found. It defined the end of the file.

// Object type detection
function getObjectType(object, tmp) {
return ( (tmp = typeof(object)) == "object" ? object == null && "null" || Object.prototype.toString.call(object).slice(8, -1) : tmp ).toLowerCase();
}

$.each(['Object', 'Array', 'String'], function(index, name) {
Helpers['is' + name] = function(object) {
return getObjectType(object) === name.toLowerCase();
};
});

But in "findTotalNumberFromRemoteResponse( )" function self.model.totalNumber is not effective !

@zlongxiang
Copy link
Author

I find the reason. I use $('.pagination_page').pagination({ }) to init, but in my html page has two .pagination_page class, so it cause error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants