主页图像滑块停止在水平滚动网站上工作

Homepage image slider stops working on horizontal scrolling website

本文关键字:滚动 水平 网站 工作 图像 主页      更新时间:2023-09-26

我一直在这里的一个网站上工作:

http://www.myheavenbridal.com.au

我有一个JS问题,主页滑块在单击主导航链接后停止工作。

ie/点击"联系我们"将滑到联系人页面,然后点击"主页"按钮将用户返回主页,但滑块停止加载图像。

如有任何关于为什么会发生这种情况或如何解决的帮助,我们将不胜感激。

在您的页面上,您注册了一个事件处理程序(使用jQuery的document.ready)-它负责加载图像。具体代码为:

jQuery(document).ready(function($){
$(function() {
    var myid = $('#cimy_div_id_0');
    if (myid[0]) {
        $('#cimy_div_id_0').crossSlide({
            fade: 7
        }, [
            { src: 'http://www.myheavenbridal.com.au/wp-content/Cimy_Header_Images/0/home_left-right.jpg', from: 'top left 1x', to: 'bottom right 1.2x', time: 5},
            { src: 'http://www.myheavenbridal.com.au/wp-content/Cimy_Header_Images/0/home_right-left.jpg', from: 'top right 1x', to: 'bottom left 1.2x', time: 5},
            { src: 'http://www.myheavenbridal.com.au/wp-content/Cimy_Header_Images/0/home_zoom-01.jpg', from: 'top left 1x', to: 'bottom right 1.2x', time: 5}
        ]);
    }  
});
});

当您单击"联系我们"按钮时,您的代码会删除图像。但是,单击"主页"不会运行上面的代码来再次添加图像。(如果您通过控制台运行代码,您将看到您的图像)。