[英]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.