pinterest / widgets

JavaScript widgets, including the Pin It button.
Other
211 stars 88 forks source link

Board widget not working inside hidden divs #37

Closed OshRoberts closed 9 years ago

OshRoberts commented 10 years ago

I'm trying to implement a number of board widgets, pointing to various boards, onto a page. These will be inside divs with display:none, until a user selects a menu option to view that section. The api does not work when inside hidden divs - how can I get round this? If I make the divs visible then the code works.

I've tried making all divs visible and only applying the hidden class inside a window.load method but this does not always work since the pinterest code is sometimes still running..

Any fixes available???

kentbrew commented 9 years ago

We'd prefer that widgets be rendered visibly and not as hidden parts (think carousels, tabs, etc.) That sort of UI is very rarely used, and rendering hidden widgets is a waste of resources.

We do have a way to dynamically render new widgets after page load; please see https://github.com/pinterest/widgets/issues/13 for details.