{"id":1625146,"date":"2018-09-19T05:06:19","date_gmt":"2018-09-19T12:06:19","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/"},"modified":"2018-09-19T05:06:19","modified_gmt":"2018-09-19T12:06:19","slug":"prevent-page-from-jumping-to-top-with-every-view-change","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/","title":{"rendered":"Prevent page from jumping to top with every view change"},"content":{"rendered":"<p>Original post:<br \/>\nhttps:\/\/wordpress.org\/support\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#post-10701241<\/p>\n<p>&#8212;<\/p>\n<p>Hello!<\/p>\n<p>The Event listing is on the bottom left of the page, and every time the user clicks to change the view they get brought to the top of the page instead of staying on the event section.<\/p>\n<p>I\u2019ve found a couple resources:<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"HCF8n4YSBM\"><p><a href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-navigation-click-jump-to-top-of-page-and-set-different-anchor\/\">Prevent navigation-click jump to top of page and set different anchor<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Prevent navigation-click jump to top of page and set different anchor&#8221; &#8212; \" src=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-navigation-click-jump-to-top-of-page-and-set-different-anchor\/embed\/#?secret=S0PpwoDJCb#?secret=HCF8n4YSBM\" data-secret=\"HCF8n4YSBM\" width=\"580\" height=\"327\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>https:\/\/stackoverflow.com\/questions\/2084750\/javascript-anchor-avoid-scroll-to-top-on-click<\/p>\n<p>The second one sounds promising but I need to know what the values are to be put in this script:<\/p>\n<p>somefunction = function () {alert(\u2018foo\u2019); return false;}<\/p>\n<p>Would you be able to provide this information?<\/p>\n<p>Thanks!!<\/p>\n","protected":false},"template":"","class_list":["post-1625146","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Prevent page from jumping to top with every view change -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Prevent page from jumping to top with every view change -\" \/>\n<meta property=\"og:description\" content=\"Original post: https:\/\/wordpress.org\/support\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#post-10701241 &#8212; Hello! The Event listing is on the bottom left of the page, and every time the user clicks to change the view they get brought to the top of the page instead of staying on the event section. I\u2019ve found a couple resources: Prevent navigation-click jump to top of page and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/\",\"name\":\"Prevent page from jumping to top with every view change -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-09-19T12:06:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Prevent page from jumping to top with every view change\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Prevent page from jumping to top with every view change -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/","og_locale":"en_US","og_type":"article","og_title":"Prevent page from jumping to top with every view change -","og_description":"Original post: https:\/\/wordpress.org\/support\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#post-10701241 &#8212; Hello! The Event listing is on the bottom left of the page, and every time the user clicks to change the view they get brought to the top of the page instead of staying on the event section. I\u2019ve found a couple resources: Prevent navigation-click jump to top of page and [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/","name":"Prevent page from jumping to top with every view change -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-09-19T12:06:19+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/prevent-page-from-jumping-to-top-with-every-view-change\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Prevent page from jumping to top with every view change"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1625146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1625146\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1625146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}