Comments (5)
Out of curiosity, what is your solution doing that seems wrong? I seems like it should work...
Probably the best thing to try is binding to the custom "click.tablesort"
event on the th
you want disabled, and then preventing the event. I believe the method you want is event.stopImmediatePropagation()
, so something like:
$('th.type-null').on('click.tablesort', function (event) {
event.stopImmediatePropagation();
return false; // May not need the return statement.
});
To be honest it's been a while since I used this plugin, so you'll probably need to experiment a bit and dig into the plugin code!
from jquery-tablesort.
Yea I started looking through the code last night. I got the disable column working the way I wanted it to.
I am running into an issue with Chrome and sorting a column with all the same values. You'd think that it just wouldn't sort since every value was the same. I made a demo in jsFiddle to demonstrate the issue. This only happens in Chrome, not Firefix. Do you think it has to do with the string comparison differences between browsers. I tried .trim() and toLowerCase(), neither made a difference.
from jquery-tablesort.
Yea I started looking through the code last night. I got the disable column working the way I wanted it to.
Cool. Mind sharing how you ended up doing this?
Regarding your jsFiddle, I see what you mean. The internal sort
method does indeed return 0
for each item in the column with similar values, so it's not related to how the browsers are comparing things.
The only thing that comes to mind is maybe Chrome iterates over the rows in a different (and unexpected) manner than Firefox does, and as a result re-appends the tr
elements in a weird order.
from jquery-tablesort.
I ended up bailing and going with https://github.com/joequery/Stupid-Table-Plugin it was able to get around the Chrome/FF issue.
from jquery-tablesort.
Okay, good to know -- thanks for the link!
from jquery-tablesort.
Related Issues (20)
- sort order when clicking on a different column HOT 2
- ​ being injected into my data-sort-value HOT 11
- Latest version not in bower HOT 1
- pagination HOT 1
- Only sorts on first click HOT 5
- Update bower dependencies HOT 1
- default sort on page load ignores direction HOT 15
- jquery-tablesort sorts incorrectly HOT 2
- Maintainers wanted! HOT 6
- Inaccurate Sorting Comparison
- Interested in these fixes? HOT 1
- Custom sorting functions: IP Address
- Currently sorted column not updated
- Can't sort column of float values? HOT 2
- asc and desc tags flipped unless default settings are manually defined
- How to remove sorting "third click"
- on() is not a function
- Memorize current sorted column when sorting by click
- looking for maintainer?
- Here is non jquery version of the same
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-tablesort.