views:

34

answers:

1

jcarousel is not firing event on images after clicking on next button. Event is binded for initial load of images.

i have added the code which i'm using to show preview of the image in carousel.

can any one please help on this,

Thanks

   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');
        }


    }
A: 

I got solution for this. previously i was calling by creating PageRequestManager instance and and firing it after page end request. It was working in this way but the issue was event was not binding to all the UL elements.

Now i'm calling this method on onmouseover event of an image. so its working fine now.

mehul9595