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

跳转到目标页之后,目标页内的Ajax内容不会加载 #2

Open
chenhengtong opened this issue Mar 9, 2017 · 2 comments
Open

Comments

@chenhengtong
Copy link

跳转到目标页之后,目标页内的Ajax内容不会加载

@TanyDevp
Copy link

TanyDevp commented Jul 24, 2017

我的解决方案是这样的:
1、在show方法(228行)里面 把 config.container.innerHTML = html 改成 $(config.container).html(html)。但是会导致重复加载的问题。
2、在show方法(228行)里面,在 config.container.innerHTML之后,使用$.getScript()加载同名JS文件(如main.html 则加载 main.js,类似于React),如果js文件需要缓存可以改成$.ajax()。

@l5769389
Copy link

页面通过pjax跳转,再由history.back返回的时候会出现js不执行的问题(比如bootstrap轮播图的js,区域滚动的js)怎么解决

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

No branches or pull requests

3 participants