Open kapil-zepo opened 10 years ago
Could you give me an example of what you would like to get? In the case of <img>
tag. Lazy Load XT just change src
attribute that is not the case of <p>
tag. Most likely you think about something similar to widget
addon, but it is better to start discussion with clear idea.
I need to lazy load my content(text) also, instead of just image. Is it possible? Am i clear this time?
I've added simple lazyloadxt.html
addon: https://github.com/ressio/lazy-load-xt/blob/master/src/jquery.lazyloadxt.html.js
The usage is very simple:
<script src="jquery.lazyloadxt.js"></script>
<script src="jquery.lazyloadxt.html.js"></script>
...
<p data-lazy-src="/url/to/lazy/load/in/p/tag.htm"></p>
Is it that you like to get?
PS. Note that currently it is just a draft and the addon may be modified further.
Yes something like that, where we can lazy load text even... You can check an example here on this page. http://theme.concept7.vn/concept1/
Thanks for your reply. Do provide a possible solution if feasible.
LazyLoading is obviously mostly for performance reasons, but sometimes I just want to hide content and "reveal it" (usually with a fade) as the visitor scrolls down the page, so it'd be great to be able to do this with any element (div/section/etc.) in a similar way described here. As I understand, the simple add-on you've created here literally loads the content in on-the-fly, but what about if I want the content to be there in the first place, but just 'revealed'? That method would be better for SEO, but it's obviously technically not "lazy loading" so I understand it is probably beyond the scope of this plugin, however, the logic for revealing things based on element position/visibility is already there, so it'd be great to re-use the plugin for this purpose too. I'd like to know your thoughts on this.
Hey,
Appreciate the work done. Just need one help, in options you have set selector as selector: 'img[data-src]', // selector for lazyloading elements
How can we include other tags, if we want to implement lazy load on those tags, viz."div", "span", "p" etc.
Any hack to this would help. Thanks. Keep up the good work. :)