How can i rerender Pinterest's Pin It button?

前端 未结 13 2177
暖寄归人
暖寄归人 2021-01-30 18:14

I\'m trying to create and manipulate the Pin It button after page load. When i change the button properties with js, it should be rerendered to get the functionality of pinning

13条回答
  •  不知归路
    2021-01-30 18:35

    I tried to adapt their code to work the same way (drop in, and forget about it), with the addition that you can make a call to Pinterest.init() to have any "new" buttons on the page (eg. ajax'd in, created dynamically, etc.) turned into the proper button.

    Project: https://github.com/onassar/JS-Pinterest Raw: https://raw.github.com/onassar/JS-Pinterest/master/Pinterest.js

提交回复
热议问题