• Resolved Mike Clarke

    (@rawthey)


    I’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.

    I’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’ve been successfully using this for a while on my website and you can see it working at http://www.sedbergh.org.uk/accommodation/bed-and-breakfast/ if you click on the “View details” link for any of the B&B’s in the list on that page.

    Would it be possible to add an optional callback feature to the official plugin? I can supply a copy of my changes if you’re interested in making use them.

    https://wordpress.org/plugins/tabby-responsive-tabs/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature request – callback function’ is closed to new replies.