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, 2022 in JQuery by Edureka
• 13,670 points
296 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, 2022 by Edureka
• 13,670 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,880 points
651 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,880 points
13,171 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,880 points
5,089 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,880 points
1,195 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,880 points
34,585 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,880 points
19,195 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, 2022 in JQuery by gaurav
• 23,260 points
343 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, 2022 in JQuery by rajatha
• 7,640 points
2,834 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, 2022 in JQuery by Edureka
• 13,670 points
21,472 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP