{"id":5600384,"date":"2014-12-21T18:27:16","date_gmt":"2014-12-21T18:27:16","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/nav-click-toggle-tried-to-change-tabs-on-other-pages\/"},"modified":"2016-08-22T13:44:44","modified_gmt":"2016-08-22T13:44:44","slug":"nav-click-toggle-tried-to-change-tabs-on-other-pages","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/nav-click-toggle-tried-to-change-tabs-on-other-pages\/","title":{"rendered":"&quot;Nav click toggle&quot; tried to change tabs on other pages"},"content":{"rendered":"<p>The javascript that changes tabs is a bit to agressive.<\/p>\n<p>I have tabs in my plugin Simple History (https:\/\/wordpress.org\/plugins\/simple-history\/) and they stopped working after installing Register Settings API. I took a quick look at the js and i think this is the cause of it:<\/p>\n<pre><code>\/\/ Nav click toggle\n\t\t\t\tif( $(&#039;.nav-tab&#039;).length ) {\n\t\t\t\t\t$( &#039;.nav-tab&#039; ).click(function(e) {<\/code><\/pre>\n<p>It seems like it tried to change tabs on all pages, but I should only work on the tabs that belong to a Settings API Page.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/register-settings-api\/<\/p>\n","protected":false},"template":"","class_list":["post-5600384","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5600384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5600384\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5600384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}