我已经安装Qtip工具提示,并用它在地图上提示:jQuery的工具提示Qtip - 我怎么可以针对不同的位置
http://www.gregquinn.com/oneworld/about_people6.html
您可以翻转的红色图钉,看到了工具提示现在在那里。
但是他们希望当你翻转单词“意大利”(左边的文字)时,同样的工具提示会弹出在意大利红旗旁边的地图上。
在地图上的红色图钉,我使用的影像地图与ALT标记来触发工具提示,像这样:
<script class="example" type="text/javascript">
// Create the tooltips only when document ready
$(document).ready(function()
{
// We'll target all AREA elements with alt tags (Don't target the map element!!!)
$('area[alt]').qtip(
{
content: {
attr: 'alt' // Use the ALT attribute of the area map for the content
},
style: {
classes: 'ui-tooltip-tipsy ui-tooltip-shadow ui-tooltip-light'
}
});
});
</script>
的Qtip documentation说,你可以指定一个位置(position: { target: $('ul:first li:last') }
),但我不知道如何做到这一点,或者我可以定位地图坐标,并将所有这些存在于一个页面上?
为什么不让地图区域覆盖国家以及红色针脚?销子靠近乡村地区,所以你应该能够轻松地修改地图区域以覆盖两者。 –