Comments (5)
sorry, I don't understand.
from jquery-lazyload-any.
刚看到您是**的,那我打中文。。。英文不好~
因为插件是抓取注释里的图片激活加载的,如下
<div class="lazyload">
<!--
<img src="image.png" />
-->
</div>
在有些场景(ajax、模板等)使用中,需要动态的去插入这些代码,如
var tpl = '<div class="lazyload"><!--<img src="image.png" />--></div>'
// 写入
document.getElementsByTagName("body")[0].innerHTML = tpl
$(".lazyload").lazyload()
这个的时候,在ie8或者某些firefox版本中,写入的其实是
<div class="lazyload"></div>
也就是说,注释里的内容被过滤掉了……
还有一种情况,网站如果使用cdn的并且开启代码优化的话,注视也会被过滤掉…
所以,注释这种的方式好像不是很安全
from jquery-lazyload-any.
Hi,
感謝你的建議, 未來將考慮增加其他的方式改善這個問題, 可能的方式是用屬性實現
from jquery-lazyload-any.
Hi, 805063c 新增兩種使用方式可解決此問題
from jquery-lazyload-any.
非常感谢!
from jquery-lazyload-any.
Related Issues (20)
- Can't get this to work on my Wordpress site, disappears on click HOT 1
- Nice scroll HOT 2
- Reverse LazyLoad Action? Refresh? HOT 2
- Must I use "<!-- -->" to lazyload something? HOT 4
- Not working on firefox HOT 2
- For iPad, It does not trigger $(element).lazyload() HOT 1
- Can I show all? HOT 1
- How to retain scroll position when redirected back to the page? HOT 5
- Add to npm HOT 1
- Float div won't work HOT 2
- Trying to combine Isotope with Lazyload HOT 1
- Example for lazyload div HOT 1
- Lazy load carousel images HOT 1
- JQuery Compatability HOT 1
- Getting error intermediate value is not a function HOT 1
- Integrating on background-image css element HOT 1
- lazy-loading not working in Firefox
- $.lazyload functions doesn't do anything
- Need Help: How can I make a lazyload for div contents text? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-lazyload-any.