我一直试图让这个工作,但它不断给我一个错误。这里是的jsfiddle:jQuery隐藏函数获取错误
但愿我不是完全拧紧这件事。
JS:
HTML:
<section id="main">
<header>
</header>
<article>
<a id="showIt" href="">Show only one</a>
</article>
<footer>
</footer>
</section>
<section id="otherObject">
<header>
</header>
<article>
<img src="tdk.jpg">
</article>
<footer>
</footer>
</section>
<section id="otherObjectTwo">
<header>
</header>
<article>
</article>
<footer>
</footer>
</section>
<section id="otherObject3">
<header>
</header>
<article>
</article>
<footer>
</footer>
</section>
它也值得了解什么'返回false'实际上是:冒泡。与'preventDefault()'相反 – 2012-07-17 15:29:16