我一直试图让它工作,但它一直给我一个错误。这是jsfiddle:
希望我没有完全搞砸。
JS:
$(document).ready(function() {
$('#showIt').click(function() {
$('#otherObject').hide();
});
});
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>