JSFiddle - React, Tailwind, and code Playground

by makelele24

JavaScript

/** EFECTO SELECCIÓN FILA CTRL+HOVER **/
let teclaPulsadaFila = false;
let hoverFila = false;

$(".fc-resource-area .fc-content td:not(.fc-divider)").hover(
                                function(e) {
                                   hoverFila = true;
                                                
                                }, function(e) {
                                    hoverFila = false;
                                    $(".fc-resource-area .fc-content td:not(.fc-divider)").removeClass('selFila'); 
                                    //$(".fc-resource-area .fc-content td:hover:not(.fc-divider)").removeClass('selFila'); 
                                }
                              ); // Fin hover
                      
                                   $(document).keydown(function(e){
                                        if (e.ctrlKey) {
                                            teclaPulsadaFila = true;
                                            if (hoverFila)
                                                $(" .fc-resource-area .fc-content td:not(.fc-divider)").addClass('selFila'); 
                                            //$("td.fc-time-area .fc-cell-content").addClass('selFila'); 
                                        }      
                                    });

                                    $(document).keyup(function(e){
                                            teclaPulsadaFila = false;
                                            $(".fc-resource-area .fc-content td:not(.fc-divider)").removeClass('selFila'); 
                                            //$("td.fc-time-area .fc-cell-content").removeClass('selFila'); 

                                    });       

                              // Si el usuario hace click sobre el funcionario cuando está pulsando la tecla control...
                              $(".fc-resource-area .fc-content tr").on('click', function(e) {
                                 ...