fbpx
Wedding Photography Melbourne Dan and Dre
/* css for changing the style of the text */ @font-face { font-family:Louize; } text { font-size: 160px; fill:white; font-family:Canopee; } svg { overflow: inherit; }                       In darkness (and, in light!) document.addEventListener(“scroll”, e => { // registering the scrolling var view = jQuery(window).scrollTop(); // get the viewport position in form ofa number var move = (view * 2) ; var screen = jQuery(window).height(); var position = jQuery(“#text-1”).offset(); var pos = parseInt((position.top).toFixed(0)); var start = (pos – move); const textPath1 = document.querySelector(“#text-1”); // this part you need to duplicate for adding more text and change the “textPath1” textPath1.setAttribute(“startOffset”, start ) // this one also duplicate and change “textPath1” // console.log(“we are here =”,view, “the height of the screen =” ,screen, “position of the text =” ,pos, “what we animate =” ,start) });
A photo of Liv and Adam at their Melbourne Wedding by Wedding photographer Briars Atlas

enquire