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

not hover when freeze column #12

Open
farazsahebdel opened this issue Aug 21, 2019 · 9 comments
Open

not hover when freeze column #12

farazsahebdel opened this issue Aug 21, 2019 · 9 comments

Comments

@farazsahebdel
Copy link

hi
when add class table-hover bootstrap

not hover when freeze column

@yidas
Copy link
Owner

yidas commented Aug 22, 2019

Hi @farazsahebdel,

You can define table-hover for the table class, and the hover will effect for both freeze column and original columns.

For example:

<table class="table table-hover">

@farazsahebdel
Copy link
Author

how ? Please explain more

Screenshot from 2019-08-22 17-35-32
Screenshot from 2019-08-22 17-42-02

@yidas
Copy link
Owner

yidas commented Aug 23, 2019

@farazsahebdel
Copy link
Author

farazsahebdel commented Aug 23, 2019

Hi @yidas
when the mouse goes over a row in the table, it has to be hover, but the columns that are freeze are not hover.

@yidas
Copy link
Owner

yidas commented Aug 24, 2019

Hi @farazsahebdel,

You may understood, freeze column rows and table rows will both effect hover but they are independent of each other.

Regards

@farazsahebdel
Copy link
Author

farazsahebdel commented Aug 24, 2019

@yidas
Well I want them both to have an effect

@yidas
Copy link
Owner

yidas commented Aug 26, 2019

Hi @farazsahebdel,

I think that freezing columns and table rows are different concepts.

Regards

@kosuha606
Copy link

kosuha606 commented Nov 2, 2019

@farazsahebdel

Did you try to proccess your issue with jquery? Maybe $('.table').mouseenter\mouseout should help.
If we will listen for mouseenter and trigger same event on freezed columns.

Did you solve your problem?

@chiahungwang
Copy link

  1. Add data-index
<tr data-index="0"></tr>
<tr data-index="1"></tr>
  1. Add hover event on both tables
$freeze_table = $('.freeze-table');
$clone_table = $('.clone-column-table-wrap');
$clone_table.find('tr').hover(function(){
    $freeze_table.find('tr[data-index='+this.getAttribute('data-index')+']').css('background-color', 'lightyellow');
}, function(){
    $freeze_table.find('tr[data-index='+this.getAttribute('data-index')+']').css('background-color', '');
});
$freeze_table.find('tr').hover(function(){
   $clone_table.find('tr[data-index='+this.getAttribute('data-index')+']').css('background-color', 'lightyellow');
}, function(){
   $clone_table.find('tr[data-index='+this.getAttribute('data-index')+']').css('background-color', '');
});

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

4 participants