I’m really struggling with a basic javascript problem and I can’t find the right way to Google help. I’ve been practicing Javascript, but thus far I’ve mainly been just following prompts, not coding my own ideas. I genuinely tried to solve this problem on my own for several hours. This is my very first attempt at generating my own javaScript
Tag: interactive
Is it possible to add duration and easing to window.scrollTo?
I’m using Bill Miller’s Interactive Decision guide code. http://www.guiideas.com/2013/09/interactive-decision-guide.html To scroll new questions into view at the bottom of the page he uses window.scrollTo Is it possible to add duration and easing to window.scrollTo or is there an alternative method? Answer Try this: Comment out (or delete) window.scrollTo(0, difHigh); line inside the if (difHigh>0) {} clause. Add $(‘html,body’).animate({scrollTop:difHigh},400); instead. JavaScript
Including JavaScript in SVG
I am trying to create an interactive SVG code with JavaScript, by embedding the JavaScript in the SVG. I don’t know if this is the right way to do this: It is supposed to have a ball that moves with wasd, but the ball doesn’t move. What am I doing wrong? Answer Here is a working version as I would