Creating a div that Rotates on Mouse Drag

Pablo,

Eureka! Thanks for your response.

You were partially correct - if the javascript code was being fetched from a different location, you’d need to link it with the code above. Since they were hosting the code on their own servers, they simply called the script from the same root. In my case, as you had suggested, I found the link here: https://bl.ocks.org/joyrexus/raw/7207044/c71f8dc15e60f772bf9f05b3fac62a7003862ef5/rotate.js

However, after linking the script, I was still not able to get it to work. The solution? You need to add “type=‘text/javascript’” inside of the tag, otherwise your code will not work. After doing that, the rotation worked perfectly, and I decided to migrate the code to my own server instead.

Take a look at the site now, and thanks for the help!

1 Like