{"id":5232,"date":"2021-07-30T02:00:00","date_gmt":"2021-07-30T00:00:00","guid":{"rendered":"https:\/\/alvarotrigo.com\/epa\/jquery-smooth-scroll\/"},"modified":"2024-07-25T20:03:43","modified_gmt":"2024-07-25T18:03:43","slug":"jquery-smooth-scroll","status":"publish","type":"post","link":"https:\/\/alvarotrigo.com\/blog\/jquery-smooth-scroll\/","title":{"rendered":"Create jQuery smooth scrolling [3 ways]"},"content":{"rendered":"\n<p>Here we&#8217;ll explain <strong>how to use jQuery to create smooth scrolling<\/strong> when navigating to a specific element on the page. jQuery makes <strong>scrolling<\/strong> effects much easier and on top of that, you make sure it works in all browsers no matter how old they are. So, if you are already using jQuery, why not take advantage of it?<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"smooth-scrolling-to-anchor-on-click\">Smooth scrolling to anchor on click<\/h2>\n\n\n<p>We will make use of the <a href=\"https:\/\/api.jquery.com\/animate\/\" target=\"_blank\" rel=\"noopener nofollow\"><code>animate<\/code> function of jQuery<\/a> to trigger the scroll when clicking on a specific element: <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/wvdmLGm\" target=\"_blank\" rel=\"noopener nofollow\">[CodePen here]<\/a>.<\/p>\n\n\n\n<p>All we need to doo is pass the elements we want the function to scroll and the scroll distance to the destination element:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-built_in\">document<\/span>).on(<span class=\"hljs-string\">\"ready\"<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n\n    <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">scrollToAnchor<\/span>(<span class=\"hljs-params\">aid<\/span>)<\/span>{\n        <span class=\"hljs-keyword\">const<\/span> destination = $(<span class=\"hljs-string\">\"a&#91;name='\"<\/span>+ aid +<span class=\"hljs-string\">\"']\"<\/span>);\n        $(<span class=\"hljs-string\">'html,body'<\/span>).animate({\n            <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n        },<span class=\"hljs-string\">'slow'<\/span>);\n    }\n\n    $(<span class=\"hljs-built_in\">document<\/span>).on(<span class=\"hljs-string\">'click'<\/span>, <span class=\"hljs-string\">'.smooth-link'<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>)<\/span>{\n        scrollToAnchor(<span class=\"hljs-string\">'demo'<\/span>);\n    });\n});\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Note that the destination element will have to contain a <code>name<\/code> property. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"demo\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You can also use the <code>id<\/code> if you prefer, but you&#8217;ll also need to replace <code>$(\"a[name='\"+ aid +\"']\");<\/code> for <code>$('#' + aid);<\/code>).<\/p>\n\n\n\n<p>Let&#8217;s go with the explanation:<\/p>\n\n\n\n<p>Let&#8217;s say you want to be able to click on a button or a link or any element on your page and smoothly scroll to it. First, we&#8217;ll need to attach the click event to it:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-built_in\">document<\/span>).on(<span class=\"hljs-string\">'click'<\/span>, <span class=\"hljs-string\">'.smooth-link'<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>)<\/span>{\n  <span class=\"hljs-comment\">\/\/ Do something on click<\/span>\n});\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now, let&#8217;s create a function that allows us to scroll to an element with a specific selector:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">scrollToAnchor<\/span>(<span class=\"hljs-params\">selector<\/span>)<\/span>{\n    <span class=\"hljs-keyword\">const<\/span> destination = $(<span class=\"hljs-string\">\"a&#91;name='\"<\/span>+ selector +<span class=\"hljs-string\">\"']\"<\/span>);\n    $(<span class=\"hljs-string\">'html,body'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    },<span class=\"hljs-string\">'slow'<\/span>);\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The magic here, as you guessed, is the use of the <a href=\"https:\/\/api.jquery.com\/animate\/\" target=\"_blank\" rel=\"noopener nofollow\"><code>animate<\/code> function of jQuery<\/a> as well as the property <code>scrollTop<\/code>. This is the beauty of jQuery making our life easier.<\/p>\n\n\n\n<p><code>scrollTop<\/code> expects to receive the number of pixels that we want the page to scroll. So all we have to do is get the destination element on our <code>destination<\/code> constant and then just get its position on the page by using <code>.offset().top<\/code>. (See more about the <a href=\"https:\/\/api.jquery.com\/offset\/\" target=\"_blank\" rel=\"noopener nofollow\">offset function of jQuery<\/a>.)<\/p>\n\n\n\n<p>And putting it all together we have the resulting code you can see above.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"smooth-scrolling-on-page-load\">Smooth scrolling on page load<\/h2>\n\n\n<p>Sometimes you might want to link a page with an anchor on the URL, for example, let&#8217;s say I want to direct my visitors to the comments section of another article, then I can use something like <code>example.com\/#comments<\/code> and expect them to land directly on the comments section of the page.<\/p>\n\n\n\n<p>Now, you might want visitors to get a context of where they are on the page they just landed, and here&#8217;s where smooth scrolling comes in handy.  It allows visitors to see where exactly they are on the page as they&#8217;ll see the page scrolling down before they land on the specific section of the page.<\/p>\n\n\n\n<p>Here&#8217;s the code you&#8217;ll need to land on a page and scroll smoothly to the anchor on page load: <a href=\"https:\/\/codepen.io\/alvarotrigo\/pen\/mdmxZwB\" target=\"_blank\" rel=\"noopener nofollow\">[CodePen here]<\/a><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-built_in\">window<\/span>).on(<span class=\"hljs-string\">\"load\"<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n    <span class=\"hljs-keyword\">var<\/span> anchor = <span class=\"hljs-built_in\">window<\/span>.location.hash.replace(<span class=\"hljs-string\">'#'<\/span>, <span class=\"hljs-string\">''<\/span>);\n    scrollToAnchor(anchor);\n});\n\n<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">scrollToAnchor<\/span>(<span class=\"hljs-params\">selector<\/span>)<\/span>{\n  <span class=\"hljs-keyword\">const<\/span> destination = $(<span class=\"hljs-string\">\"a&#91;name='\"<\/span>+ selector +<span class=\"hljs-string\">\"']\"<\/span>);\n    $(<span class=\"hljs-string\">'html,body'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    },<span class=\"hljs-string\">'slow'<\/span>);\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The code looks quite similar to the previous scenario but in this case, we are waiting for all elements on the page to load before calling our <code>scrollToAnchor<\/code> function. This is especially important if you have images that take some time to load, as normally the height of those images is not determined until they completely load. So, images that are yet to load can appear with a height of 0 and only get their final height once the image completely loads.<\/p>\n\n\n\n<p>So, to fix that, we add this:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">$(<span class=\"hljs-built_in\">window<\/span>).on(<span class=\"hljs-string\">\"load\"<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n    <span class=\"hljs-comment\">\/\/ All images are now loaded<\/span>\n});\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Then we get the URL anchor with <code>window.location.hash<\/code> and use it instead in our call to the <code>scrollToAnchor<\/code> function. That should return <code>#comments<\/code> for our example. But we just need the word <code>comments<\/code> which is the value our destination element will have. (<code>&lt;a name=\"comments\"&gt;&lt;\/a&gt;<\/code>). So let&#8217;s just remove the <code>#<\/code> part too using <code>replace<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">scrollToAnchor(<span class=\"hljs-built_in\">window<\/span>.location.hash.replace(<span class=\"hljs-string\">'#'<\/span>, <span class=\"hljs-string\">''<\/span>));\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Now we add the same <code>scrollToAnchor<\/code> we applied on our previous example and that&#8217;s it!<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"smooth-scrolling-inside-a-scrollable-element\">Smooth scrolling inside a scrollable element<\/h2>\n\n\n<p>Let&#8217;s say you want to be able to scroll inside an element that has a scrollbar and uses <code>overflow: scroll<\/code>. How can we do this?<\/p>\n\n\n\n<p>Easy, we just change the element we want to apply the animation to:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">    <span class=\"hljs-comment\">\/\/ Our element now has id #destination<\/span>\n    $(<span class=\"hljs-string\">'#destination'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    }, <span class=\"hljs-number\">8000<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here&#8217;s an example:<\/p>\n\n\n\n<div class=\"wp-block-cp-codepen-gutenberg-embed-block cp_embed_wrapper\"><iframe id=\"cp_embed_MWmVNwa\" data-src=\"\/\/codepen.io\/anon\/embed\/MWmVNwa?height=450&amp;theme-id=1&amp;slug-hash=MWmVNwa&amp;default-tab=css,result\" height=\"450\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowpaymentrequest name=\"CodePen Embed MWmVNwa\" title=\"CodePen Embed MWmVNwa\" class=\"cp_embed_iframe lazyload\" style=\"width:100%;overflow:hidden\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" data-load-mode=\"1\">CodePen Embed Fallback<\/iframe><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"changing-the-animation-effect-(easing)\">Changing the animation effect (easing)<\/h2>\n\n\n<p><a href=\"https:\/\/jqueryui.com\/easing\/\" target=\"_blank\" rel=\"noopener nofollow\">jQuery comes with 2 different animation effects<\/a> we can choose from. Those are called &#8220;easing functions&#8221; and we can apply one or another depending on our preferences.<\/p>\n\n\n\n<p>By default jQuery uses <code>swing<\/code>, but we can also use <code>linear<\/code>.<\/p>\n\n\n\n<p>Here&#8217;s an example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">    $(<span class=\"hljs-string\">'#destination'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    }, <span class=\"hljs-number\">8000<\/span>, <span class=\"hljs-string\">\"linear\"<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>We can add even more effects if we include <a href=\"https:\/\/github.com\/gdsmith\/jquery.easing\/blob\/master\/jquery.easing.js\" target=\"_blank\" rel=\"noopener nofollow\">this file<\/a>. You can see their names <a href=\"https:\/\/github.com\/gdsmith\/jquery.easing\/blob\/master\/jquery.easing.js#L53\" target=\"_blank\" rel=\"noopener nofollow\">on the code<\/a> (easeInQuad, easeOutQuad, easeInOutQuad etc.)<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"configuring-the-scrolling-speed\">Configuring the scrolling speed<\/h2>\n\n\n<p>The <a href=\"https:\/\/api.jquery.com\/animate\/\" target=\"_blank\" rel=\"noopener nofollow\"><code>animate<\/code> function of jQuery<\/a> allows us to configure the speed. In this example, we are using a predefined value by using <code>slow<\/code>.<\/p>\n\n\n\n<p>The possible predefined values are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>slow<\/code> = 600 milliseconds<\/li>\n\n\n\n<li><code>normal<\/code> = 400 milliseconds<\/li>\n\n\n\n<li><code>fast<\/code> = 200 milliseconds<\/li>\n<\/ul>\n\n\n\n<p>You can, if you prefer, define your own duration in milliseconds, just pass it instead of any of these values. Here&#8217;s an example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">    <span class=\"hljs-comment\">\/\/ 8 seconds animation<\/span>\n    $(<span class=\"hljs-string\">'html,body'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    }, <span class=\"hljs-number\">8000<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"doing-something-when-the-animation-ends-(callbacks)\">Doing something when the animation ends (callbacks)<\/h2>\n\n\n<p>The <code>animate<\/code> function of jQuery provides what we call &#8220;callbacks&#8221;. Functions that get executed once certain even takes place. In this case, the animate function executes a function once the animation has finished.<\/p>\n\n\n\n<p>Here&#8217;s what it looks like:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">    <span class=\"hljs-comment\">\/\/ 8 seconds animation<\/span>\n    $(<span class=\"hljs-string\">'html,body'<\/span>).animate({\n      <span class=\"hljs-attr\">scrollTop<\/span>: destination.offset().top\n    }, <span class=\"hljs-number\">8000<\/span>, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>)<\/span>{\n        <span class=\"hljs-comment\">\/\/ This is the callback function<\/span>\n        <span class=\"hljs-comment\">\/\/ Whatever you run here will get executed <\/span>\n        <span class=\"hljs-comment\">\/\/ once the animation finishes<\/span>\n        alert(<span class=\"hljs-string\">\"Done scrolling\"<\/span>);\n    });\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n<p>In this article we&#8217;ve covered the most common scenarios for a smooth jQuery scroll to elements&#8217; anchors within the same page. This is all you need to know about this particular feature. But if you miss anything please let us know in the comments.<\/p>\n\n\n\n<p>If you are looking for more scroll animations, check out the <a href=\"https:\/\/alvarotrigo.com\/blog\/jquery-carousel\/\">best jQuery Carousel plugins<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>3 ways to create jQuery smooth scrolling. Scrolling to anchor or specific elements. Both on click and page load.<\/p>\n","protected":false},"author":1,"featured_media":5231,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[120],"tags":[9,16,18],"class_list":["post-5232","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery","tag-css","tag-design","tag-jquery"],"acf":[],"_links":{"self":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/comments?post=5232"}],"version-history":[{"count":5,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5232\/revisions"}],"predecessor-version":[{"id":15609,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/posts\/5232\/revisions\/15609"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media\/5231"}],"wp:attachment":[{"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/media?parent=5232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/categories?post=5232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alvarotrigo.com\/blog\/wp-json\/wp\/v2\/tags?post=5232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}