jquery-freeze-table icon indicating copy to clipboard operation
jquery-freeze-table copied to clipboard

not hover when freeze column

Open farazsahebdel opened this issue 5 years ago • 9 comments

hi when add class table-hover bootstrap

not hover when freeze column

farazsahebdel avatar Aug 21 '19 14:08 farazsahebdel

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">

yidas avatar Aug 22 '19 02:08 yidas

how ? Please explain more

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

farazsahebdel avatar Aug 22 '19 13:08 farazsahebdel

Hi @farazsahebdel,

https://jsfiddle.net/0zc5rpa9/4/

Regards

yidas avatar Aug 23 '19 08:08 yidas

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.

farazsahebdel avatar Aug 23 '19 13:08 farazsahebdel

Hi @farazsahebdel,

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

Regards

yidas avatar Aug 24 '19 01:08 yidas

@yidas Well I want them both to have an effect

farazsahebdel avatar Aug 24 '19 13:08 farazsahebdel

Hi @farazsahebdel,

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

Regards

yidas avatar Aug 26 '19 06:08 yidas

@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?

kosuha606 avatar Nov 02 '19 07:11 kosuha606

  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', '');
});

chiahungwang avatar Jan 14 '20 06:01 chiahungwang