JQuery UI 菜单幻灯片
JQuery UI menu slide
我试图通过在用户单击我的不同导航链接时将内容滑出页面来更改我的页面内容。到目前为止,我可以从我的主页滑到我的其他页面之一,这工作正常。但我不确定如何滑回第一页。
我用来滑到第一页的脚本:
<script>
function slide(div)
{
if(div == "work")
{
$('#home').hide('slide', {direction: 'left'}, 1000);
$('#work').delay(600).show('slide', {direction: 'right'}, 1000);
}
}
</script>
随着我的导航菜单滑动的内容:
<div class='nav'>
<table class='nav'>
<tr>
<td width='23%'><a href='index.html' onclick='slide("home");' class='link'>home</a></td>
<td width='23%'><a href='#' onclick='slide("work");' class='link'>work</a></td>
<td width='23%'><a href='#' class='link'>about</a></td>
<td width='31%'><a href='#' class='link'>contact</a></td>
</tr>
</table>
</div>
<div class='content' id='home'>
<h1>hello</h1>
<table class='content'>
<tr>
<td><img src='images/icon1.png' class='icon'></td>
<td><p>i’m thobias nordgaard. a front and back end<br>
developer from denmark. i love what i do,<br>
hopefully you will too.<br><br>
Im fluid in html, css, php and improving in<br>
javascript, jquery and sass. if you dont know<br>
what these things are, all they mean is: i can<br>
make websites.</p></td>
</tr>
</table>
</div>
<div class='content' id='work'>
<h1>work</h1>
<table class='content'>
<tr>
<td><img src='images/icon1.png' class='icon'></td>
<td><p>I haven't completed any work yet :(</p></td>
</tr>
</table>
</div>
修复了它。我已经使第一个链接导航到首页,因此当您按下它时页面会刷新。导致脚本无法:)运行
相关文章:
- JQuery.animate()菜单幻灯片返回
- 如何使用JQuery制作此菜单幻灯片
- .net幻灯片菜单
- 单击选项卡时要关闭的幻灯片菜单
- 如何使幻灯片菜单始终打开
- 单击窗口时,幻灯片菜单会重新移动
- 如何在应用程序中隐藏幻灯片菜单
- 幻灯片菜单Javascript不工作
- 两个大幻灯片菜单可以放在一个页面上吗?
- 弹跳幻灯片菜单与Jquery
- 顶部幻灯片菜单问题
- Javascript/ Jquery幻灯片菜单不工作在Chrome浏览器
- 什么是导致链接不工作与navgoco幻灯片菜单
- 如何使这个幻灯片菜单工作
- 如何添加";慢效应";当从左边滑出时转到我的幻灯片菜单
- 幻灯片菜单没有'不起作用
- 幻灯片菜单与引导程序相结合
- 移动幻灯片菜单可滚动
- 你如何创建这个jquery幻灯片菜单效果
- 如何用jQuery创建幻灯片菜单(从右到左/从左到右)