gijsroge / tilt.js

A tiny 60+fps parallax tilt hover effect for jQuery.

Home Page:http://gijsroge.github.io/tilt.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Targeting consecutive nested elements for parallax effect

stmalk opened this issue · comments

Hi,
I'm trying to add parallax effect to a portfolio gallery items. I activate data-tilt on the main container and inside of it there are thumbnails, overlay, title etc, which are all nested inside each other. I set the main container to transform-style: preserve-3d; and set following nested child elements to transform: translateZ(50px); but it doesn't seem to be working, there is no parallax effect going on.

The only way I could make it work was by using data-tilt on one of the pre-last nested child elements and only in that case the last child inside of it actually had parallax working. So it looks like parallax refuses to work if there are more than one child elements inside of main data-tilt container. Tilt.js parallax samples all have only one element nested inside as well, proving my guesses.

Could you please take a look at that issue and maybe give a hint how to add parallax to all (or some) nested child elements?

Thank you

@stmalk did you ever fix this?