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

Does Tablesorter work fine in jquery >= 3.0.0? #1401

Closed
Federico-G opened this issue May 14, 2017 · 4 comments
Closed

Does Tablesorter work fine in jquery >= 3.0.0? #1401

Federico-G opened this issue May 14, 2017 · 4 comments

Comments

@Federico-G
Copy link
Contributor

I tested the plugin with basic functionality and seems to work fine. Can anyone confirm this for all scenarios?

@Mottie
Copy link
Owner

Mottie commented May 14, 2017

Hi @Federico-G!

As far as I have tested it, this fork has no issues with jQuery 3+... the main documentation page always runs the latest version. Where as this page has been set to use jQuery v1.2.6.

@Federico-G
Copy link
Contributor Author

Excelent @Mottie.

I see that the main page run the migrate plugin, and it has at least 5 warnings

$.migrateWarnings ->
0:"jQuery.expr[":"] is now jQuery.expr.pseudos"
1:"jQuery.expr.filters is now jQuery.expr.pseudos"
2:"jQuery.fn.bind() is deprecated"
3:"jQuery.fn.unbind() is deprecated"
4:"jQuery.unique is deprecated, use jQuery.uniqueSort"

I think that those warning are only for deprecated methods, so it still works. But eventually those changes have to be made

0 & 1: https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-expr-quot-quot-and-jquery-expr-filters

These two names for defining custom selectors through jQuery's Sizzle selection engine are the same as jQuery.expr.pseudos, so we are deprecating the redundant names.

2 & 3: https://jquery.com/upgrade-guide/3.0/#deprecated-bind-and-delegate

Five years ago in jQuery 1.7 we introduced the .on() method for attaching event handlers. The older .bind(), .unbind(), .delegate() and .undelegate() methods are being deprecated as of 3.0, but are still present. The API documentation explains how to rewrite the calls using the .on() and .off() methods.

4: https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-unique-renamed-to-jquery-uniquesort

The jQuery.unique() method has been renamed to jQuery.uniqueSort() to make its behavior easier to understand. There is no change to functionality here, only a rename.

@Mottie
Copy link
Owner

Mottie commented May 15, 2017

Yes, I am at least aware of the bind/unbind issue - see #1293. In my (possibly feeble) attempt to keep this plugin compatible with older versions of jQuery. I would need to keep using .bind() and .unbind().

My intention was to avoid creating a major version update of tablesorter, meaning it would break all backwards compatibility. Instead, I plan to create a new table sorting library named Abelt - please ignore the current code there because it is way out of date. This updated version will be written as to not have any dependencies. I was planning on writing it to work with React, but we'll have to wait and see... I'm still learning React and there is already a pretty awesome react table plugin, even it it doesn't actually use a <table>.

@Federico-G
Copy link
Contributor Author

I'm really waiting to try and help with Abelt when you continue working in it.

And I think that if you can build it without dependencies, and port it to angular, react... It will be perfect!

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

No branches or pull requests

2 participants