繁体   English   中英

jcarousel没有触发图像上的事件

[英]jcarousel is not firing event on images

单击下一步按钮后,jcarousel不会在图像上触发事件。 事件绑定用于图像的初始加载。

我添加了用于在轮播中显示图片预览的代码。

有人可以帮忙吗,

谢谢

   function imagePreview() {
        xOffset = 50;
        yOffset = 60;

        $("img.preview").hover(function (e) {
            this.t = this.title;
            this.title = "";
            var c = (this.t != "") ? "<br/>" + this.t : "";

            PageMethods.GetItemLargeImage(this.id, largeImageSucceed, largeimageFail);

            $("img.preview").mouseout(function () {

                document.getElementById("displayPreviewImage").src = "";

            })
        },

function () {
    this.title = this.t;
    $("#preview").remove();
});

        $("img.preview").mousemove(function (e) {
            $("#preview")
        .css("top", 100 + "px")
        .css("left", 400 + "px");
        });

        function largeImageSucceed(result) {
            document.getElementById("displayPreviewImage").src = result;
        }
        function largeimageFail() {
            //alert('hi');
        }


    }

我对此有解决方案。 以前,我是通过创建PageRequestManager实例并在页面结束请求后触发它来调用的。 它以这种方式工作,但问题是事件未绑定到所有UL元素。

现在,我在图像的onmouseover事件上调用此方法。 所以现在工作正常。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM