我有被在图像的显示悬停提示, 提示的内容是放大版图像徘徊..显示负载效应
问题:的工具提示中的图像加载缓慢..我怎样才能显示加载器,直到图像不加载在Tootip?
<img id="small-img" title= "<img id='big-img' src=<?=getResizedImage(imageId, 500);?>>" src="<?= getResizedImage(imageId, 150); ?>" />
我有被在图像的显示悬停提示, 提示的内容是放大版图像徘徊..显示负载效应
问题:的工具提示中的图像加载缓慢..我怎样才能显示加载器,直到图像不加载在Tootip?
<img id="small-img" title= "<img id='big-img' src=<?=getResizedImage(imageId, 500);?>>" src="<?= getResizedImage(imageId, 150); ?>" />
我的“标题”的内容移动到其他分区(“工具提示内容”)..
下面是我的修正,显示工具提示里面一个div解决的问题。
//Image to be hovered to show Tooltip
<img id="small-img" src="<?= getImage(imageId, 150); ?>" />
//Contents to be displayed in Tooltip.
<div id="tooltip-contents" style="display:none;">
<img src='<?= getImage(imageId, 500); ?>'/>
</div>
//Contents of .js
$('#small-img').attr('title', function(){
return $('#tooltip-contents').html();
});
$("#small-img").tooltip({
options : {
content : function() {
return $(this).prop('title');;
}
}
});
我想包的image
与container
并添加background-image
为`容器。
如果我理解正确,你的img-big将显示在工具提示中?
你可以再看看这个问题..我错过了有问题的东西先前 – webDev
这不会在您的HTML中造成错误吗? 'title =“
Mephiztopheles
请忽略这样的事情..我有正确的工作提示那里 – webDev
而你不能在CSS中定义'background-image'为容器?或者你已经尝试过了吗? – Mephiztopheles