Skip to content

Tag: easing

Smooth scrolling with easing isn’t working

I have a JQuery function which should allow smooth scrolling with JQuery easing however it does not work and I can’t seem to find the error. The code for the function is I made a JSFiddle with the function in to give an example. (I included the code for the JQuery easing) Here is a similar function in JSFiddle however,

Is it possible to add duration and easing to window.scrollTo?

I’m using Bill Miller’s Interactive Decision guide code. 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

Simple easing function in javascript

I’m having trouble figuring out this simple math problem. I have spent over two hours reading through various related answers on SO and Google, but it seems my high school math knowledge is gone. On the page I have an element, that, once it passes a threshold, gets scaled down, the closer it gets to the edge of the containing