Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用切换 Jquery。我想将主题保留在页面的左侧。当用户点击主题时,该主题的相关内容应显示在页面右侧。请任何人都可以提供有关如何使用切换来执行此操作的详细说明吗?
$('.topic').click(function() { $('.related-content', this).toggle(); });
http://api.jquery.com/toggle/
演示