Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$(...).lazylaod is not a function #41

Open
liurui39660 opened this issue Aug 28, 2018 · 6 comments
Open

$(...).lazylaod is not a function #41

liurui39660 opened this issue Aug 28, 2018 · 6 comments
Labels

Comments

@liurui39660
Copy link

主题用的commit a226d89,没有任何魔改,win10和ubuntu 18.04下测试都是如此,nodejs 10.9,chrome 68

全局开启lazyload之后,当hexo s时在console里输出

jquery-3.2.1.min.js:2 jQuery.Deferred exception: $(...).lazylaod is not a function TypeError: $(...).lazylaod is not a function
    at nlvi.bootstrap (http://localhost:4000/script/src/nlvi.js:345:33)
    at HTMLDocument.<anonymous> (http://localhost:4000/script/bootstarp.js:4:7)
    at j (http://localhost:4000/script/lib/jquery/jquery-3.2.1.min.js:2:29999)
    at k (http://localhost:4000/script/lib/jquery/jquery-3.2.1.min.js:2:30313) undefined
r.Deferred.exceptionHook @ jquery-3.2.1.min.js:2
jquery-3.2.1.min.js:2 Uncaught TypeError: $(...).lazylaod is not a function
    at nlvi.bootstrap (nlvi.js:345)
    at HTMLDocument.<anonymous> (bootstarp.js:4)
    at j (jquery-3.2.1.min.js:2)
    at k (jquery-3.2.1.min.js:2)

换成截图大概是这个样子
image
然后各种图片就统统显示不出来了

npm ls --depth=0的部分输出

pdf倒是都很正常,也就装了这么一个多余的东西

还需要其他什么debug信息嘛?

@colmugx colmugx added the bug label Aug 29, 2018
@colmugx
Copy link
Owner

colmugx commented Aug 29, 2018

感谢,第一次看到这么清晰的描述

这个问题估计是我这边代码的问题,尽快解决

@liurui39660
Copy link
Author

知道真相的我眼泪掉下来……

@colmugx
Copy link
Owner

colmugx commented Aug 29, 2018

我也有锅,标题这么大我完全没看。

第一次看到这么清晰的描述结果是这个问题,可以载入史册了..

@liurui39660
Copy link
Author

liurui39660 commented Aug 29, 2018

刚刚测试了一下发现了新的问题

我的图片使用{% asset_img <filename> %}的方式加载

37826282-33af-4697-b613-b140c0d24830

注意到那个图片闪了一下然后消失了

消失后该元素在chrome里的代码为

<img class="lazy" data-src="http://192.168.28.193:3000/RA-CNN/Figure%202.jpg" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC">

在我能够及时按下Esc阻止图片消失的场合下,代码是这样

<img src="/RA-CNN/Figure%202.jpg">

不知道是哪里存在的问题


为什么issue没有reopen?reopen在哪里放着呢?

@colmugx colmugx reopened this Aug 29, 2018
@colmugx
Copy link
Owner

colmugx commented Aug 29, 2018

如果不用 lazyload 有没有问题?我没用过这种引用方式

@liurui39660
Copy link
Author

不使用lazyload的话不会出现这种情况,图片可以正常加载
这个方式hexo自身就支持的,所以可能有会有其他人也遇到同样的问题
文档链接:https://hexo.io/docs/asset-folders.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants