A box appears in each row of the table, slides out of hiding, scrolls the screen when the box is incomplete, and the mouse leaves the line, resulting in never seeing the full contents of the box.

problem description:

as you slide through each row in the table, a box appears at the bottom, sliding out and hiding. But the box that appears when the bottom part of the table slides over is incomplete, and once you slide the scroll bar, the mouse will leave this line, causing the box to disappear, so that the full contents of the bottom box will not be seen all the time.

related js code:

$(".drugContainer-in1").on("mouseenter","tr",function(){
        //td
        var tdVal = $(this).find("td").eq(1).text();
        if (tdVal == "" || tdVal == undefined || tdVal == null) {
            return;
        };
        //tr
        getTrDetail($(this));
        var thisTop = parseInt($(this).position().top) + $(this).outerHeight()+8;
        $(".drug-view-position1").css("top",thisTop + "px").show();
    }).on("mouseleave","tr",function(){
        $(".drug-view-position1").hide();
    });

Dec.05,2021

clickmousenetermouseleavemouseleavehide()click

the first is to use the click method to manually close
after removal. The second can try to bind events for document or their parent elements, and determine to hide

after leaving the table and the box at the same time.
Menu