欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jQuery實現(xiàn)鼠標經(jīng)過提示信息的地圖熱點效果

 更新時間:2015年04月26日 10:35:04   投稿:hebedich  
這是一個升級版本,更新了一個在IE8里的小問題,加入了提示框的內(nèi)容自動換行處理(北京點上有演示)!估計差不多該是最后樣式了。IE6、IE8、谷歌、火狐、測試正常。

jQuery實現(xiàn)鼠標經(jīng)過提示信息的地圖熱點效果

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>地圖熱點效果-鼠標經(jīng)過彈出提示信息</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 如果需要讀取變量最好寫在網(wǎng)頁里,也可以寫在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'>內(nèi)蒙古地圖熱點效果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="內(nèi)蒙古" 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>
</body>
</html>

以上所述就是本文的全部內(nèi)容了,希望大家能夠喜歡

相關(guān)文章

  • jQuery div拖拽用法實例

    jQuery div拖拽用法實例

    這篇文章主要介紹了jQuery div拖拽用法,以完整實例形式分析了jQuery結(jié)合UI插件實現(xiàn)拖拽功能的相關(guān)技巧,需要的朋友可以參考下
    2016-01-01
  • jquery+ajax實現(xiàn)省市區(qū)三級聯(lián)動效果簡單示例

    jquery+ajax實現(xiàn)省市區(qū)三級聯(lián)動效果簡單示例

    這篇文章主要介紹了jquery+ajax實現(xiàn)省市區(qū)三級聯(lián)動效果,結(jié)合實例形式分析了jQuery結(jié)合ajax實現(xiàn)省市區(qū)三級聯(lián)動功能的具體步驟與相關(guān)操作技巧,需要的朋友可以參考下
    2017-01-01
  • 如何使用jQUery獲取選中radio對應(yīng)的值(一句代碼)

    如何使用jQUery獲取選中radio對應(yīng)的值(一句代碼)

    一些基本的語法在使用中老忘掉,下列使用jQUery獲取選中radio對應(yīng)的值,剛剛想起來,感興趣的朋友可以了解下
    2013-06-06
  • 20個非常棒的Jquery實用工具 國外文章

    20個非常棒的Jquery實用工具 國外文章

    網(wǎng)站設(shè)計者往往會設(shè)計一些小的工具類(widgets)或者一些可復(fù)用的程序,從而使頁面更楚楚動人,更吸引瀏覽者駐足。這里收集了20個常用Jquery工具類,這些小的工具可以幫助網(wǎng)站設(shè)計人員和站長非常容易地創(chuàng)建漂亮的站點。
    2010-01-01
  • 基于jquery的simpleValidate簡易驗證插件

    基于jquery的simpleValidate簡易驗證插件

    簡易驗證插件simpleValidate使用心得,基于JQuery,修改小BUG后能兼容各瀏覽器,附自用版本供下載
    2014-01-01
  • jQuery超精致圖片輪播幻燈片特效代碼分享

    jQuery超精致圖片輪播幻燈片特效代碼分享

    這篇文章主要為大家詳細介紹了jQuery超精致圖片輪播幻燈片特效,圖片輪播效果特別適合做產(chǎn)品展示,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2015-09-09
  • jQuery插件scroll實現(xiàn)無縫滾動效果

    jQuery插件scroll實現(xiàn)無縫滾動效果

    今天給大家分享一款頁面無縫滾動的jquery.scroll插件。 支持上下左右,淡入淡出,滾動時間設(shè)置,動畫時間設(shè)置,鼠標經(jīng)過是否停止設(shè)置,滾動鼠標液動條看下頁面的切換效果。該插件適用瀏覽器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗。
    2015-04-04
  • jQuery和HTML對某個標簽設(shè)置只讀或者禁用屬性的方式

    jQuery和HTML對某個標簽設(shè)置只讀或者禁用屬性的方式

    這篇文章主要介紹了jQuery和HTML對某個標簽設(shè)置只讀或者禁用屬性的方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2023-02-02
  • struts2 jquery 打造無限層次的樹

    struts2 jquery 打造無限層次的樹

    需要:Struts2 , jquery樹插件 模擬數(shù)據(jù)庫數(shù)據(jù):每行數(shù)據(jù)包括--自己ID,自己內(nèi)容,父親ID
    2009-10-10
  • jQuery 源碼分析筆記(5) jQuery.support

    jQuery 源碼分析筆記(5) jQuery.support

    接下來是非常糾結(jié)的一個話題,也是所有JS庫必須實現(xiàn)的一個功能:瀏覽器兼容性和為開發(fā)者屏蔽這些差異。
    2011-06-06

最新評論