We need to lazy load tweets embedded. In our use case there are hundreds of tweets into the same page, that is loaded at once.
We would like to have the lazy load functionality working with these tweets, and load the tweets when needed.
So to make it happen we need to:
1) Transform the html to insert widgets.js just one time.
2) Change all tweet class to another class (or keep into data-class attribute)
3) When load one tweet, a new lazyload plugin should fix the tweet class just for the displayed tweet and fire the twttr.widgets.load() method to load the tweet.
We need to lazy load tweets embedded. In our use case there are hundreds of tweets into the same page, that is loaded at once.
We would like to have the lazy load functionality working with these tweets, and load the tweets when needed.
So to make it happen we need to: 1) Transform the html to insert widgets.js just one time. 2) Change all tweet class to another class (or keep into data-class attribute) 3) When load one tweet, a new lazyload plugin should fix the tweet class just for the displayed tweet and fire the
twttr.widgets.load()
method to load the tweet.