{"id":3415,"date":"2011-08-14T12:38:43","date_gmt":"2011-08-14T10:36:32","guid":{"rendered":"https:\/\/www.digital-noises.com\/?p=3415"},"modified":"2012-11-03T12:49:20","modified_gmt":"2012-11-03T10:49:20","slug":"jquery-scroll-to-anchor","status":"publish","type":"post","link":"https:\/\/www.digital-noises.com\/en\/jquery-scroll-to-anchor\/","title":{"rendered":"jquery scroll to anchor"},"content":{"rendered":"<p>The following script scrolls on klick on an <a> tag called &#8220;#anchor&#8221; to \u00a0an <a> tag with the attribute name=&#8221;anchor&#8221;.<\/p>\n<pre>$(\"a[href^='#']\").click(function() {\r\n   $('html,body').stop().animate({\r\n       scrollTop: $(\"a[name^='\"+$(this).attr(\"href\").substr(1)+\"']\")\r\n       .offset().top},1500);\r\n      return false;\r\n})<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following script scrolls on klick on an tag called &#8220;#anchor&#8221; to \u00a0an tag with the attribute name=&#8221;anchor&#8221;. $(&#8220;a[href^=&#8217;#&#8217;]&#8221;).click(function() { $(&#8216;html,body&#8217;).stop().animate({ scrollTop: $(&#8220;a[name^='&#8221;+$(this).attr(&#8220;href&#8221;).substr(1)+&#8221;&#8216;]&#8221;) .offset().top},1500); return false; })<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[583,1221],"tags":[],"class_list":["post-3415","post","type-post","status-publish","format-standard","hentry","category-internet-work","category-problem-solving","cat-583-id","cat-1221-id"],"acf":[],"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","icl_get_languages":{"en":{"code":"en","id":"1","native_name":"English","major":"1","active":"1","default_locale":"en_US","encode_url":"0","tag":"en","translated_name":"English","url":"https:\/\/www.digital-noises.com\/en\/","country_flag_url":"https:\/\/www.digital-noises.com\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/en.png","language_code":"en"},"de":{"code":"de","id":"3","native_name":"Deutsch","major":"1","active":0,"default_locale":"de_DE","encode_url":"0","tag":"de","translated_name":"German","url":"https:\/\/www.digital-noises.com\/","country_flag_url":"https:\/\/www.digital-noises.com\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/de.png","language_code":"de"}},"_links":{"self":[{"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/posts\/3415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/comments?post=3415"}],"version-history":[{"count":0,"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/posts\/3415\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/media?parent=3415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/categories?post=3415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.digital-noises.com\/en\/wp-json\/wp\/v2\/tags?post=3415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}