<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jQuery Archives - AtCodex: Empowering Your Financial Journey &amp; Personal Well-Being</title>
	<atom:link href="https://atcodex.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>https://atcodex.com/tag/jquery/</link>
	<description>Achieve financial success without sacrificing well-being! AtCodex provides actionable strategies for managing money, time, and personal growth—all in one place.</description>
	<lastBuildDate>Sat, 28 Aug 2021 17:15:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://atcodex.com/wp-content/uploads/2020/05/cropped-New-Project-1-32x32.png</url>
	<title>jQuery Archives - AtCodex: Empowering Your Financial Journey &amp; Personal Well-Being</title>
	<link>https://atcodex.com/tag/jquery/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>jQuery Back to Top Smooth scroll</title>
		<link>https://atcodex.com/jquery/jquery-back-to-top-smooth-scroll/</link>
		
		<dc:creator><![CDATA[atcodex]]></dc:creator>
		<pubDate>Fri, 24 Jul 2020 04:08:14 +0000</pubDate>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Ajax]]></category>
		<guid isPermaLink="false">https://atcodex.com/?p=509</guid>

					<description><![CDATA[<p>If you have large content, multiple sections, and topics on your website, then going from bottom to top becomes a bit boring work on the website page. You might have &#8230; </p>
<p>The post <a href="https://atcodex.com/jquery/jquery-back-to-top-smooth-scroll/">jQuery Back to Top Smooth scroll</a> appeared first on <a href="https://atcodex.com">AtCodex: Empowering Your Financial Journey &amp; Personal Well-Being</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you have large content, multiple sections, and topics on your website, then going from bottom to top becomes a bit boring work on the website page. You might have observed  &#8220;Back To Top&#8221; button on many websites,  it is used when the page becomes very lengthy. </p>



<p class="wp-block-paragraph">In this tutorial, you will see how you can apply Smooth scrolling effect and allow users to click on back to top button to instantly go on top of the website page. You can also implement this scroll function to a particular section on the website.</p>



<p class="wp-block-paragraph">The following is an HTML code in which we have an anchor tag, which defines the section where we will go after clicking on the scroll button.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;body>
&lt;a name="top" class="top">&lt;/a> 
&lt;!--- your page content goes here -->
&lt;!-- back to top button -->
&lt;a id="goTop" class="btn btn-primary">Back to top&lt;/a>
&lt;/body></pre>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading">Add Ajax library in scroll back to top</h2>



<p class="wp-block-paragraph">Add the following library in code, which will execute the  jQuery functions.</p>



<pre class="wp-block-code"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js">&lt;/script></code></pre>



<h2 class="wp-block-heading">jQuery code for Back to Top Smooth scroll </h2>



<p class="wp-block-paragraph">With <strong>jQuery&nbsp;<em>animate()</em></strong>&nbsp;method, we can easily scroll user back to the top of the page.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;script type='text/javascript'>
$('#goTop').on('click', function(e){
    $("html, body").animate({scrollTop: $(".top").offset().top}, 500);
});
&lt;/script></pre>



<p class="wp-block-paragraph">This is a very simple code to perform jQuery bottom to Top Smooth scroll.  This can also be used to scroll to a particular div section, you just need to pass the <strong>className </strong>in<strong> animate</strong> function. </p>



<p class="wp-block-paragraph">For example, you can use any other <strong>className </strong>than <strong>top </strong>and just place that <strong>className</strong> somewhere in your same website page.</p>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link">Output</a></div>
</div>



<figure class="wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe title="Add Ajax library in scroll back to top" width="735" height="413" src="https://www.youtube.com/embed/9-FqVKXO5d8?feature=oembed" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></figure>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link" href="https://atcodex.com/wp-content/uploads/2020/07/jQuery-bottom-to-Top-Smooth-scroll.zip">Download Source Code</a></div>
</div>
<p>The post <a href="https://atcodex.com/jquery/jquery-back-to-top-smooth-scroll/">jQuery Back to Top Smooth scroll</a> appeared first on <a href="https://atcodex.com">AtCodex: Empowering Your Financial Journey &amp; Personal Well-Being</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
