本文参考自http://www.kxya.com/archives/442.html, 作者提供了两个方法用来优化插件的加载速度,按照其方法修改过后,竟然解决了点击照片一直加载中的问题=,=。
原出处应该是针对Auto-Highslide原版进行的修改,由于我用的是William君修改的版本,便做了细微改动,方便看到代码头痛的童鞋。另外文中的第二个方法由于William君修改过代码,对我来说有点惆怅。便采用了第一种方法。。
在Footer.php中添加如下代码即可。
<link rel="stylesheet" href="http://nekosun.org/wp-content/plugins/auto-highslide/highslide/highslide.css" type="text/css" /> <script type="text/javascript" src="http://nekosun.org/wp-content/plugins/auto-highslide/highslide/highslide-with-html.packed.js"></script> <script type="text/javascript"> hs.graphicsDir = "http://nekosun.org/wp-content/plugins/auto-highslide/highslide/graphics/"; hs.outlineType = "rounded-white"; hs.dimmingOpacity = 0.8; hs.outlineWhileAnimating = true; hs.showCredits = false; hs.captionEval = "this.thumb.alt"; hs.numberPosition = "caption"; hs.align = "center"; hs.transitions = ["expand", "crossfade"]; hs.addSlideshow({ interval: 5000, repeat: true, useControls: true, fixedControls: "fit", overlayOptions: { opacity: 0.75, position: "bottom center", hideOnMouseOut: true } }); </script>
文中提到了删除 <?php wp_head(); ?>,不太明白,至少在我的footer.php中没有出现这个。
出现过Auto-Highslide一直加载情况的童鞋赶紧试试看吧,(使用原版的可以参考原文中的方法直接修改试试看)不保证对所有情况有效=,=
测试效果如下,可用键盘左右键:
16 thoughts on “针对“威言威语Auto-Highslide修改版”一直加载中的解决办法”