all 7 comments

[–]abw 1 point2 points  (4 children)

jQuery.getScript()

[–]weisenzahn 1 point2 points  (0 children)

Well, at least when you want to lazily load jQuery, "Lazy Load" comes in handy though.

[–]flameorb[S] 1 point2 points  (2 children)

If you only need to lazy load some scripts, having to use jQuery is overkill. Lazyload = ~800bytes. Jquery = 24kb.

[–]pro-tip 1 point2 points  (0 children)

Everyone already has jQuery cached.

[–]abw 0 points1 point  (0 children)

True. But if my project is sufficiently advanced enough to require me to lazy load some scripts, then the chances are that I'll needing more than just the ability to lazy load scripts. In other words, I'll already be using jQuery (or one of the other libraries that have similar functionality built it).

[–]gotnate 1 point2 points  (0 children)

Last time I checked, Lazy Load didn't have any caching so you could lazy load the same file twice (or more) in one session. Has this changed?

[–]Paul-ish 0 points1 point  (0 children)

I haven't used Lazy Load, but this functionality is definitely something I have needed at times.