得到了这个地图区域
<area title="hello" alt="hi there" nohref="<?php bloginfo('template_url'); ?>/images/image1.jpg" shape="rect" coords="216,371,418,490" href="#" />这段jquery代码
$('#first area').imgPreview({
containerID: 'imgPreviewWithStyles',
imgCSS: {
// Limit preview size:
height: 200
},
// When container is shown:
onShow: function(link){
$('<span>' + $(link).text() + '</span>').appendTo(this);
},
// When container hides:
onHide: function(link){
$('span', this).remove();
}
});如何在由imgPreview插件创建的附加范围内显示地图区域的alt文本的代码
我认为这是唯一需要更改的部分
$('<span>' + $(link).text() + '</span>').appendTo(this);发布于 2012-10-24 08:14:45
这里是一个有用的小提琴http://jsfiddle.net/tariqulazam/3Yckp/
// When container is shown:
onShow: function(link){
$('<span>' + $(link).attr('alt') + '</span>').appendTo(this);
}https://stackoverflow.com/questions/13041138
复制相似问题