【发布时间】:2016-07-24 20:43:40
【问题描述】:
有没有办法在完全加载 html 后加载这些 sn-ps? 如果在 js 文件(设置为 ASYNC 加载)之后加载 sn-ps 甚至设置一个计时器,我会很高兴。
<script>$(document).ready(function(){var modals = ['#bookings', '#studios', '#mygallery', '#social', '#reviews', '#articles', '#contactme', '#credits', '#pagemap', '#tsandcs', '#events'];if (window.location.hash && ~modals.indexOf(window.location.hash)) {$(window.location.hash).modal();}})</script>
<script>$(document).ready(function(){$("#myModal11").modal('show');});</script>
<script>$(".modal:not(.noclose) a").click(function(){$(this).closest(".modal").modal("hide");});</script>
【问题讨论】:
-
页面加载后的前 2 个加载,最后一个需要文档就绪语句,如上所示
标签: javascript jquery html reload