且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Javascript/JQuery 直到页面重新加载后才工作

更新时间:2022-12-07 08:38:38

这听起来与您的自定义脚本和 Squarespace 的 AJAX 加载:

This sounds like a conflict with your custom script and Squarespace's AJAX loading:

偶尔,Ajax 可能会与嵌入的自定义代码或锚点发生冲突链接.Ajax 还可以干扰站点分析,记录点击仅第一页.

Occasionally, Ajax may conflict with embedded custom code or anchor links. Ajax can also interfere with site analytics, logging hits on the first page only.

因此,根据您的模板,您可能会发现禁用 AJAX 是一个简单的解决方案:

So, depending on your template, you may find that disabling AJAX is a simple solution:

您可以在样式编辑器中禁用 Ajax,但有一些例外:

You can disable Ajax in the Style Editor, with some exceptions:

  • 无法在 Skye、Foundry 或 Tudor 中禁用 Ajax.
  • 不能在 Farro 和 Haute 的博客登录页面上禁用 Ajax.如果在这些模板中取消选中 Enable Ajax Loading,它们仍将使用 Ajax 加载博客页面.

启用或禁用 Ajax:

To enable or disable Ajax:

  • 在主菜单中,单击设计,然后单击样式编辑器.
  • 向下滚动到站点:加载中.
  • 选中或取消选中启用 Ajax 加载.

如果您不想完全禁用 AJAX,则请参阅此答案中的选项 2" 了解方法编写您的代码,使其能够在初始页面加载和 AJAX 页面加载时工作.

If you do not want to disable AJAX altogether, then see "Option 2" in this answer for ways to write your code so that it will work on initial page load and on AJAX page loads.