Importing Javascript

Hi guys,

I am fairly new to webflow and I had a question in regards to applying Javascript to an image.

Heres my site:

My goal is to have the land image (earth) rotate like a gear when scrolling. Specifically like this:

I used the following code and put it in the home page site settings before the tag but it doesn’t seem to work and I was hoping one of you could help me out!

<script src=""></script> 
	$(window).scroll(function() {
	var theta = $(window).scrollTop() / 10 % Math.PI;
	$('#landimage').css({ transform: 'rotate(' + theta + 'rad)' });


You are using <style> tags instead of <script> tags.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.