J
J
John2016-01-26 18:23:25
css
John, 2016-01-26 18:23:25

Cubic-bezier in javascript?

How CSS3's cubic-bezier timing is applied is well known. But how do I use such a value in my jQuery expression? For example, I have a structure:

var time = 1000;
    	$('.header-arrow').on('click', function(){
    		$('body,html').animate({
    			scrollTop: $(window).height(),
        }, time
    		);
    	});

How can I use a cubic-bezier value of type cubic-bezier(.17,.67,1,-0.11) instead of the value 1000 for the time variable, and is it even possible to do it this way?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question