add the behaviour of mouseenter and mouseleave event