Streaming live at 10am (PST)

Interaction to change z-index


#1

I am wondering if there is a way to create an interaction where a hover on object A changes the z-index of object B?


#2

@Marcel_Deelen you can't do this natively in Webflow, but with some custom code you should be OK. Remember, for this to work the element must be either absolutely positioned, relatively positioned, or fixed. The custom code could look something similar to this:

$(".your-element").hover(function(){
    $(".other-element").css("z-index", "10");
    }, function(){
    $(".other-element").css("z-index", "1");
});