【发布时间】:2013-11-24 03:27:25
【问题描述】:
我有一个 html 页面,它被分成单行和两列。第 1 列的宽度为 90%,第 2 列的宽度为 10%。
当页面加载时,我希望第二列应该完全隐藏,并且在整个页面上应该有第一列的内容。
但是当我将鼠标移向右侧页面的 10% 时。 td 的内容应该是滑动的,当我移出鼠标时,它应该向右滑动(隐藏)。
我正在尝试这样做:
$(document).ready(function() {
document.getElementById("map-canvas").style.height = document.body.clientHeight + 'px';
$( "#side" ).mouseover(function() {
document.getElementById("map-canvas").className = "OverlayEffect";
$( "#map-canvas" ).animate({
width: "100%"
});
});
$( "#side" ).mouseout(function() {
$( "#map-canvas" ).animate({
width: "90%"
});
});
});
HTML:
<table width="100%">
<tr>
<td width="90%" id="map">
<!-- start Loading Fancy Box handling -->
<div id="modalMsg">
<br /> <br /> <imgsrc="../DiagnosticDrop4/static/images/ajax-loader.gif" /> <br /> <br />
</div>
<!-- end Loading Fancy Box handling -->
<div id="map-canvas"></div>
</td>
<td width="10%" class="Sidebar" id="side">
<div id="map-canvas1">
<a id='link' href='../DiagnosticDrop4/san.html'>
<h3>
<center>Add/Delete SAN</center>
</a>
</div>
<div id="map-canvas2">
<a id='alink' href='../DiagnosticDrop4/ParamIntervalDetails'>
<h3>
<center>24hr Dashboard</center>
</a>
</div>
</td>
</tr>
</table>
【问题讨论】:
-
向您展示标记以及您尝试了什么?
-
@Varun Jindal 我们应该为你编写代码吗?
标签: javascript jquery css html jquery-slider