使用Javascript/ Jquery,如何链接具有相同类名的两个类?当单击一个时,将显示匹配的类名的内容。
<div class="menu">
<div>
<a class="about link" href=#>About</a> //this is the button to click
</div>
<div><a class="service link" href=#> Service</a> </div></div>
<aside class="overlay about"> About section</aside> //the content will display depending on which button was pressed
<aside class="overlay service"> Services </aside>发布于 2015-02-10 14:00:02
$('document').ready(function(){
$('.about link').click(function(){
$('.overlay about').show();
});
});https://stackoverflow.com/questions/28425013
复制相似问题