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

Sort IP Address #195

Closed
shw1395 opened this issue Mar 18, 2018 · 1 comment
Closed

Sort IP Address #195

shw1395 opened this issue Mar 18, 2018 · 1 comment

Comments

@shw1395
Copy link

shw1395 commented Mar 18, 2018

Here has very useful code for reference: https://github.com/DataTables/Plugins/blob/master/sorting/ip-address.js , copy them into "$(function(){ var ip_address_pre = function(a) { ...return x;},"

then add this after "var table = $("table[id^='Stupid-Table-Plugin'][class^='table-striped']").stupidtable({"
"date": function(a,b) {
// Get these into date objects for comparison.
...
},
"ip": function(a,b) {
aIP = ip_address_pre(a);
bIP = ip_address_pre(b);
return aIP - bIP;
}
});

testing result and good luck!

@joequery
Copy link
Owner

joequery commented Dec 6, 2019

Cool, thanks for the example. 👍

@joequery joequery closed this as completed Dec 6, 2019
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