Closed kostafey closed 10 years ago
it might be the onLoad function of holder is running before the snippet is loading. Looking at the documentation for holder.js it seems that you need to run Holder.run() after the snippet is loaded.
CK
On Sat, May 31, 2014 at 12:38 PM, kostafey notifications@github.com wrote:
How can I use holder.js https://github.com/imsky/holder in html snippet?
It's impossible to simple use
(despite holder.js is loaded on target page).
— Reply to this email directly or view it on GitHub https://github.com/ckirkendall/enfocus/issues/95.
It fails when loading /holder.js/128x128
inside compiled main.js
:
GET 404 Not Found text/html main.js:28516 Script
May be it should not try to load this resource and output it literally?
Use data-src instead of src. Holder.js says it supports both.
Creighton On May 31, 2014 1:00 PM, "kostafey" notifications@github.com wrote:
It fails when loading /holder.js/128x128 inside compiled main.js:
GET 404 Not Found text/html main.js:28516 Script
May be it should not try to load this resource and output it literally?
— Reply to this email directly or view it on GitHub https://github.com/ckirkendall/enfocus/issues/95#issuecomment-44753501.
Thank you very much!
The solution is to use data-src
and run the following code after the snippet is rendered:
(.run js/Holder)
How can I use holder.js in html
snippet
?It's impossible to simple use
(despite holder.js is loaded on target page).