how can when click buton scrool to another elemtn
$("button").click(function() {
$('html,body').animate({
scrollTop: $(".second").offset().top},
'slow');
});
// example: http://jsfiddle.net/ryXFt/3/$(window).scroll(function() {
$('html, body').animate({
scrollTop: $("#myDiv").offset().top
}, 2000);
});
Also in JavaScript:
- How to create HTML forms and attach JavaScript behaviors ALL TYPES
- update object in react hooks
- javascript get element width and height
- javascript redirect to another page
- gulp serve Cannot find module 'gulp-sass'
- how to make apk react native
- can we get the value of form control after disabling it angular
- nodejs express return image
- js match true false
- lodash find object in array
- http request javascript fetch
- react how to pass the input target value
- angular navigate using component
- javascript remove quotes from string
- react check if window exists
- javascript test regex date with slashes
- random color generator javascript
- if member has role discord.js
- vscode new file shortcut
- jquery fadein
- find length of longest string in array javascript
- javascript get last word in string
- trigger click on checkbox jquery
- create eventlistener to close webpage js