Hi @mariusjopen,
thanks for your answer. I already read the instructions on the laytheme page regarding custom javascript. Unfortunately I have issues with implementing this effect although I tried it with multiple different versions. This is what I have so far:
-
I gave a row the id "landing-content"
-
I inserted the following custom css:
#landing-content {
overflow: hidden;
background-image: url(image.jpg);
width: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
- I inserted the javascript into custom HTML at bottom:
<script>
jquery('#landing-content').mousemove(function(e){
var amountMovedX = (e.pageX * -1 / 6);
var amountMovedY = (e.pageY * -1 / 6);
jquery(this).css('background-position', amountMovedX + 'px ' + amountMovedY + 'px');
});
</script>
Do you or anybody else have any thoughts on this or might be able to tell me where I’m wrong?
Thanks in advance :)