有一个<ul>
导航链接。一个特定<li>
的实际上变成了 3 个链接。希望那个特定<li>
的滑动打开和关闭以显示其他三个链接。
在这里举办。
<ul id="courseLinks">
<li><a href="#"><strong>Week 1</strong> introduction</a></li>
<li><a href="./homework/week2/week2homework.htm"><strong>Week 2</strong> dev tools + standards</a></li>
<li><a href="./homework/week3/week3homework.htm"><strong>Week 3</strong> HTML 5 & SEO</a></li>
<li><a href="#" id="homeworkSlide"><strong>Week 4</strong> css concepts</a></li>
<li id="slider"><a href="homework/week4/exercise1.htm">Exercise 1</a>
<a href="homework/week4/exercise2.htm">Exercise 2</a>
<a href="homework/week4/week4homework.htm">Homework</a></li>
<li><a href="#"><strong>Week 5</strong> advanced css</a></li>
<li><a href="#"><strong>Week 6</strong> server side includes</a></li>
<li><a href="#"><strong>Week 7</strong> site construction</a></li>
<li><a href="#"><strong>Week 8</strong> development methodology 1</a></li>
<li><a href="#"><strong>Week 9</strong> user experience</a></li>
<li><a href="#"><strong>Week 10</strong> social software</a></li>
<li><a href="#"><strong>Week 11</strong> project work</a></li>
<li><a href="#"><strong>Week 12</strong> final examination</a></li>
</ul><!--nav-->
查询:
$('#homeworkSlide').click(function() {
$('#slider').slideToggle('slow', function() {
// Animation complete.
});
});
拒绝工作。此时自学javascript,难道就不能这样修改<ul>
吗?还是我做错了什么?