Smooth scroll without the use of jQuery

0 votes
I'm coding up a page where I only want to use raw JavaScript code for UI without any interference of plugins or frameworks.

And now I'm struggling with finding a way to scroll over the page smoothly without jQuery.
Jun 1 in JQuery by Edureka
• 13,640 points
24 views

1 answer to this question.

0 votes

document. querySelector('your-element'). scrollIntoView({behavior: 'smooth'}); If you want to scroll top the top of the page, you can just place an empty element in the top, and smooth scroll to that one.

answered Jun 1 by Edureka
• 13,640 points

Related Questions In JQuery

0 votes
1 answer

How can I determine the direction of a jQuery scroll event?

Hello @kartik, Check current scrollTop vs previous scrollTop var lastScrollTop = 0; $(window).scroll(function(event){ ...READ MORE

answered Nov 24, 2020 in JQuery by Niroj
• 82,740 points
220 views
0 votes
1 answer

What is the equivalent of jQuery .hide() to set visibility: hidden

Hello Kartik, There isn't one built in but ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,740 points
6,024 views
0 votes
1 answer

How can you disable scroll bars in the jQuery UI dialog box?

Hello @kartik, I solved the problem like this: .dialog({ ...READ MORE

answered May 29, 2020 in JQuery by Niroj
• 82,740 points
2,700 views
0 votes
1 answer

How to use $(document).ready equivalent without jQuery

Hello @kartik, Using DOMContentLoaded that is supported by over ...READ MORE

answered Sep 10, 2020 in JQuery by Niroj
• 82,740 points
271 views
0 votes
1 answer

How to Smooth scroll to div id jQuery?

Hello @kartik, You need to animate the html, body $("#button").click(function() ...READ MORE

answered Oct 5, 2020 in JQuery by Niroj
• 82,740 points
17,102 views
0 votes
1 answer

jQuery Event : Detect changes to the html/text of a div

Hello, If you don't want use timer and ...READ MORE

answered Nov 25, 2020 in JQuery by Niroj
• 82,740 points
9,717 views
0 votes
1 answer

Scroll to the top of the page using JavaScript?

The scrollTo() method of the window Interface ...READ MORE

answered Jun 10 in JQuery by gaurav
• 16,820 points
11 views
0 votes
1 answer

What is the meaning of symbol $ in jQuery?

$ sign is just a valid javascript identifier ...READ MORE

answered Jun 15 in JQuery by rajatha
• 6,640 points
22 views
0 votes
1 answer

How to change color of SVG image using CSS (jQuery SVG image replacement)?

Edit your SVG file, add fill="currentColor" to ...READ MORE

answered Jun 1 in JQuery by Edureka
• 13,640 points
240 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP