jQuery地图热点效果-鼠标经过弹出提示层信息

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>地图热点效果-鼠标经过弹出提示信息</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<script src="/ajaxjs/jquery-1.6.2.min.js" type="text/javascript"></script><!-- 建议用1.7的jquery -->
<script type="text/javascript">var jq = jQuery.noConflict();</script><!-- 为了让DZ X2支持jquery 加载时替换库中的$为jq -->
<style type="text/css">
.map img { width:496px; height: 415px; }
.mapDiv { padding: 5px; width:170px; height:61px; color:#369; background: url(‘hotarrow.gif‘) no-repeat; }
</style><!-- CSS样式 -->
<body>
<!-- JS 如果需要读取变量最好写在网页里,也可以写在JS文件里!-->
<script type="text/javascript">
jq(document).ready(function(){
jQuery.fn.extend({
TitleShow: function(strHTML) {
var xOffset = 80;
var yOffset = -75;
var preview = jq("#preview_container");
if(preview.length<=0){
jq("body").append("<div id=‘preview_container‘></div>");
preview = jq("#preview_container");
}
preview.css({
"display":"none",
"position":"absolute",
"width":"150px",
"word-break":"break-all"
});
return this.each(function() {
var _this = jq(this);
_this.hover(
function(e){
preview.html(strHTML);
preview
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.css("opaticy",0)
.show()
.stop()
.animate({"opacity":0.9},300);

},function(){
preview
.stop()
.animate({"opacity":0},300,function(){
jq(this).hide();
});
}
)
_this.mousemove(function(e){
preview
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
});
}
});
jq("#beijing").TitleShow("<div class=‘mapDiv‘>北京地图热点效果-这里是测试换行效果-这里是测试换行效果</div>");
jq("#tianjin").TitleShow("<div class=‘mapDiv‘>天津地图热点效果2</div>");
jq("#shanghai").TitleShow("<div class=‘mapDiv‘>上海地图热点效果3</div>");
jq("#chongqing").TitleShow("<div class=‘mapDiv‘>重庆地图热点效果4</div>");
jq("#hebei").TitleShow("<div class=‘mapDiv‘>河北地图热点效果5</div>");
jq("#shanxi").TitleShow("<div class=‘mapDiv‘>山西地图热点效果6</div>");
jq("#neimenggu").TitleShow("<div class=‘mapDiv‘>内蒙古地图热点效果7</div>");
jq("#liaoning").TitleShow("<div class=‘mapDiv‘>地图热点效果8</div>");
jq("#jilin").TitleShow("<div class=‘mapDiv‘>地图热点效果9</div>");
jq("#heilongjiang").TitleShow("<div class=‘mapDiv‘>黑龙江地图热点效果10</div>");
jq("#jiangsu").TitleShow("<div class=‘mapDiv‘>地图热点效果11</div>");
jq("#zhejiang").TitleShow("<div class=‘mapDiv‘>地图热点效果12</div>");
jq("#anhui").TitleShow("<div class=‘mapDiv‘>地图热点效果13</div>");
jq("#fujian").TitleShow("<div class=‘mapDiv‘>地图热点效果14</div>");
jq("#jiangxi").TitleShow("<div class=‘mapDiv‘>地图热点效果15</div>");
jq("#shandong").TitleShow("<div class=‘mapDiv‘>山东地图热点效果16</div>");
jq("#henan").TitleShow("<div class=‘mapDiv‘>河南地图热点效果17</div>");
jq("#hubei").TitleShow("<div class=‘mapDiv‘>湖北地图热点效果18</div>");
jq("#hunan").TitleShow("<div class=‘mapDiv‘>地图热点效果l9</div>");
jq("#guangdong").TitleShow("<div class=‘mapDiv‘>地图热点效果20e</div>");
jq("#guangxi").TitleShow("<div class=‘mapDiv‘>地图热点效果21</div>");
jq("#hainan").TitleShow("<div class=‘mapDiv‘>地图热点效果22</div>");
jq("#sichuan").TitleShow("<div class=‘mapDiv‘>地图热点效果23</div>");
jq("#guizhou").TitleShow("<div class=‘mapDiv‘>地图热点效果24</div>");
jq("#yunnan").TitleShow("<div class=‘mapDiv‘>地图热点效果25</div>");
jq("#shaanxi").TitleShow("<div class=‘mapDiv‘>地图热点效果26</div>");
jq("#gansu").TitleShow("<div class=‘mapDiv‘>地图热点效果27</div>");
jq("#qinghai").TitleShow("<div class=‘mapDiv‘>地图热点效果28</div>");
jq("#ningxia").TitleShow("<div class=‘mapDiv‘>宁夏地图热点效果29</div>");
jq("#xinjiang").TitleShow("<div class=‘mapDiv‘>新疆地图热点效果30</div>");
jq("#xizang").TitleShow("<div class=‘mapDiv‘>地图热点效果31</div>");
jq("#xianggang").TitleShow("<div class=‘mapDiv‘>香港地图热点效果32</div>");
jq("#aomen").TitleShow("<div class=‘mapDiv‘>地图热点效果33</div>");
jq("#taiwan").TitleShow("<div class=‘mapDiv‘>地图热点效果34</div>");
});
</script>
<!--热点HTML代码开始 -->
<div class="map">
<img border="0" usemap="#Map" src="map.png" />
<map name="Map" id="Map">
<area id="beijing" alt="北京" href="#" coords="354,140,380,153" shape="rect">
<area id="shanghai" alt="上海" href="#" coords="434,246,462,259" shape="rect">
<area id="tianjin" alt="天津" href="#" coords="382,168,408,180" shape="rect">
<area id="chongqing" alt="重庆" href="#" coords="294,264,320,276" shape="rect">
<area id="hebei" alt="河北" href="#" coords="347,174,374,186" shape="rect">
<area id="shanxi" alt="山西" href="#" coords="322,186,348,198" shape="rect">
<area id="neimenggu" alt="内蒙古" href="#" coords="349,110,388,124" shape="rect">
<area id="liaoning" alt="辽宁" href="#" coords="406,128,432,140" shape="rect">
<area id="jilin" alt="吉林" href="#" coords="427,101,454,115" shape="rect">
<area id="heilongjiang" alt="黑龙江" href="#" coords="424,58,464,73" shape="rect">
<area id="jiangsu" alt="江苏" href="#" coords="404,224,417,250" shape="rect">
<area id="zhejiang" alt="浙江" href="#" coords="413,265,427,291" shape="rect">
<area id="anhui" alt="安徽" href="#" coords="382,236,395,263" shape="rect">
<area id="fujian" alt="福建" href="#" coords="399,300,413,327" shape="rect">
<area id="jiangxi" alt="江西" href="#" coords="371,286,385,313" shape="rect">
<area id="shandong" alt="山东" href="#" coords="373,196,399,208" shape="rect">
<area id="henan" alt="河南" href="#" coords="337,228,364,239" shape="rect">
<area id="hubei" alt="湖北" href="#" coords="329,258,356,271" shape="rect">
<area id="hunan" alt="湖南" href="#" coords="325,294,352,306" shape="rect">
<area id="guangdong" alt="广东" href="#" coords="356,343,382,355" shape="rect">
<area id="guangxi" alt="广西" href="#" coords="302,343,328,355" shape="rect">
<area id="hainan" alt="海南" href="#" coords="313,398,340,411" shape="rect">
<area id="sichuan" alt="四川" href="#" coords="239,265,265,277" shape="rect">
<area id="guizhou" alt="贵州" href="#" coords="283,311,308,324" shape="rect">
<area id="yunnan" alt="云南" href="#" coords="225,337,251,349" shape="rect">
<area id="shaanxi" alt="陕西" href="#" coords="303,224,316,251" shape="rect">
<area id="gansu" alt="甘肃" href="#" coords="179,156,205,168" shape="rect">
<area id="qinghai" alt="青海" href="#" coords="174,206,200,218" shape="rect">
<area id="ningxia" alt="宁夏" href="#" coords="277,188,290,212" shape="rect">
<area id="xinjiang" alt="新疆" href="#" coords="85,140,111,152" shape="rect">
<area id="xizang" alt="西藏" href="#" coords="87,249,113,261" shape="rect">
<area id="xianggang" alt="香港" href="#" coords="379,358,406,370" shape="rect">
<area id="aomen" alt="澳门" href="#" coords="349,371,375,383" shape="rect">
<area id="taiwan" alt="台湾" href="#" coords="434,322,448,348" shape="rect">
</map>
</div>
<div>http://www.999jiujiu.com/</div>
</body>
</html>

时间: 2024-07-29 10:13:10

jQuery地图热点效果-鼠标经过弹出提示层信息的相关文章

jQuery地图热点效应-后在弹出的提示鼠标层信息

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>地图热点效果-鼠标经过弹出提示信息</title> <meta http-equiv="Content-Type" content=&q

鼠标提上去弹出提示层(定位)

希望的效果如图: 网上找了各纯css的 做了下修改: 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <style> .logo1{     width:150px;     height:60px;     float:left } a.alt{ positi

jQuery - 选中复选框则弹出提示框

<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>判断是否选中</title> <script type="text/javascript" src="./js/jquery-1.8.3.min.js"></script> <script

Jquery实现鼠标hover图片遮罩弹出提示层特效

1.引入JS文件和所需要的样式文件 2.简单的写上以下18行代码就可以实现了 $(document).ready(function() { $("div.tip_trigger a.img").hover(function() { $(this).parent('div.tip_trigger').css({ 'background': '#8de08b', 'z-index': '1000' }); $('#h_coolsite .block').show(); tip = $(th

css实现的当鼠标悬浮弹出说明层效果

css实现的当鼠标悬浮弹出说明层效果:本章节分享一段代码实例,它是使用纯css实现的鼠标悬浮弹出说明层效果.代码实例如下: <!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" /> <title>蚂蚁部落</

仿京东(我的商城)鼠标上去弹出层效果

引用jquery-1.9.1.min.js文件: 效果: html内容: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head&g

Jquery学习之路(三) 实现弹出层插件

弹出层的应用还是比较多的,登陆,一些同页面的操作,别人的总归是别人的,自己的才是自己的,所以一直以来想写个弹出层插件.不多废话,直接开始吧! 不想看可以在这里直接下载源码xsPop.zip 1:遮罩层 要弹出层,先要用一个遮罩层挡在下面的页面,此遮罩层是全屏的,页面滚动也要有,所以设置 position: fixed;还要有透明效果,下面是我定义的遮罩层css,取名mask .mask { position: fixed; width: 100%; height: 100%; backgroun

鼠标悬浮弹出跟随鼠标移动的带箭头的信息层

鼠标悬浮弹出跟随鼠标移动的带箭头的信息层:很多网站,当鼠标悬浮在一个元素上的时候能够弹出一个信息说明层,并且此层能够跟随鼠标移动,同时弹出的层带有箭头,此箭头指向鼠标悬浮的元素,下面就通过实例代码简单介绍一下如何实现此效果.代码实例如下: <!DOCTYPE html> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"

基于Jquery 简单实用的弹出提示框

引言: 原生的 alert 样子看起来很粗暴,网上也有一大堆相关的插件,但是基本上都是大而全,仅仅几句话可以实现的东西,可能要引入好几十k的文件,所以话了点时间自己写了个弹出效果,放到项目上去发现效果还不错,这里贴出来,做个备忘,有需要的同学可以拿去,也可以作为一个参考. 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.d