{"id":7711774,"date":"2016-08-29T12:50:56","date_gmt":"2016-08-29T12:50:56","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/feature-request-callback-function\/"},"modified":"2016-09-01T18:25:44","modified_gmt":"2016-09-01T18:25:44","slug":"feature-request-callback-function","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/feature-request-callback-function\/","title":{"rendered":"Feature request &#8211; callback function"},"content":{"rendered":"<p>I&#8217;ve had problems with Google maps not being displayed correctly if they are not in the first tab. I understand that this is due to the map being rendered with zero height and width if the tab containing the content is not visible on page load.<\/p>\n<p>I&#8217;ve patched my copy of Tabby Responsive Tabs to enable the shortcode to accept the name of a JavaScript function to be used as a callback when the tab is clicked. This enables me to defer the generation of the map until the first time the tab is opened. I&#8217;ve been successfully using this for a while on my website and you can see it working at <a href=\"http:\/\/www.sedbergh.org.uk\/accommodation\/bed-and-breakfast\/\">www.sedbergh.org.uk\/accommodation\/bed-and-breakfast\/<\/a> if you click on the &#8220;View details&#8221; link for any of the  B&amp;B&#8217;s in the list on that page.<\/p>\n<p>Would it be possible to add an optional callback feature to the official plugin? I can supply a copy of my changes if you&#8217;re interested in making use them.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/tabby-responsive-tabs\/<\/p>\n","protected":false},"template":"","class_list":["post-7711774","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7711774","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\/7711774\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7711774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}