lai32290 / TableHeadFixer

A jQuery plugin for fix HTML table Head, Foot and Columns
105 stars 45 forks source link

This could not work in IE as well as it was in Chrome or firefox #12

Open kaxiaoche opened 8 years ago

kaxiaoche commented 8 years ago

Hi @lai32290 ,

I found a little bug in your TableHeadFixer.

It works perfect in Chrome and firefox.

but The fixing head or the fixing column will slight shaking while I‘m dragging the scrollbar in IE.

looking forward to your reply.

: - )

ghost commented 8 years ago

Hello,

Have you found the solution for this?

Best Regards

anand81192 commented 6 years ago

try this put this code inside parent.on()

anand81192 commented 6 years ago

try this code inside , it worked for me if (navigator.userAgent.match(/Trident\/7./)) { // if IE function handle(delta) { parent.stop().animate({ scrollTop: parent.scrollTop() - (distance * delta) }, time); } parent.on("mousewheel", function (event) {

                    if (event.originalEvent.wheelDelta) delta = event.originalEvent.wheelDelta / 120;
                    else if (event.originalEvent.detail) delta = -event.originalEvent.detail / 3;

                    handle(delta);
                    if (event.preventDefault) event.preventDefault();
                    event.returnValue = false;
                });

                parent.on("keydown", function (e) {
                    switch (e.which) {
                        //up
                        case 38:
                            e.preventDefault();
                            parent.stop().animate({
                                scrollTop: parent.scrollTop() - distance
                            }, time);
                            break;

                        //down
                        case 40:
                            e.preventDefault();
                            parent.stop().animate({
                                scrollTop: parent.scrollTop() + distance
                            }, time);
                            break;
                    }

                });

            }
Avinash-Reddy95 commented 5 years ago

Did any one solved this issue. I have tried above solution provide by @anand81192. But that is also not working.