【发布时间】:2015-04-08 08:10:58
【问题描述】:
我正在尝试在平板电脑上使用的网站上加入悬停图像旋转功能。不幸的是,我对如何解决最后一块拼图有点迷茫。有谁能帮忙吗?下面的脚本在悬停时旋转图像并添加一个额外的文本框。
jquery:
$(document).ready(function(){
$(".1").hover(
function(){$("#Information-Seawater").show();},
function(){$("#Information-Seawater").hide()});
});
jQuery(function(){
$(".1").hover(
function(){this.src = this.src.replace("-Icon","-Image");},
function(){this.src = this.src.replace("-Image","-Icon");
});
});
风格:
#Information-Seawater {
display: none;
top: 650px;
margin-left:auto;
margin-right:auto;
width:60%;
font-family: Consolas;
background: #00bbe4;
border: 2px solid black;
COLOR: #006080;
}
html:
<td class="style6" style="height: 77px; width: 140px"><a href="Http://"><img `id="1" height="147" src="website-%20images/Seawater-Icon.jpg" alt="" class="1" width="140"></a></td>`
<div id="Information-Seawater">
<span class="Information-Header">text<br /></span>
text
<br />
</div>
上述脚本在个人电脑上运行良好,但在平板电脑上却不行。我希望有人能够帮助我将上面的功能与下面的功能结合起来,在平板电脑上,需要在悬停之前单击一次图像。
http://jsfiddle.net/c_kick/s9rB4/
或
Jquery hover function and click through on tablet
感谢任何帮助!
【问题讨论】: