扰流板显示代码

Spoiler Display Code

本文关键字:代码 显示      更新时间:2023-12-05

我有一个关于您在本页中的扰流板的问题:

http://jdownloader.org/download/index

当我点击Windows时,会显示一个表,但当我点击Linux,Windows的内容会消失。我想创建一个这样的扰流板,但当我按下另一个扰流板时,一个扰流板的内容不会消失

我应该在这个代码(html源代码)中更改什么

<div class="dokuwiki">
        <div class="right_page">
<div class="entry-content">
<script type="text/javascript" src="./JDownloader.org - Official Homepage_files/jquery.js"></script>
 <script type="text/javascript">                                         
 $(document).ready(function(){
 $(".nonjs").removeAttr( "href"); //href is needed for users without JS
 $('.OS').click(function(){
 if($(this).find(".details").is(":visible"))
 {
   $(this).find(".details").not(":hidden").hide("slow");
   return true;
 }
 else
 {
   $(".OS").not(this).each(function(i) {
     $(this).find(".details").hide("slow");
   });
   $(this).find(".details").show("slow");
   return false;
 }
 });
 });
 </script>     
 <style type="text/css">
 <!--
.details {
display: none;
clear: both;
padding: 2px;
}
.nonjs{
    cursor:pointer;
}
img {
border: 0px;
}
-->
</style>
$(".OS").not(this).each(function(i) {
    $(this).find(".details").hide("slow");
});

该部分会找到所有不是当前(单击)的部分并将其隐藏。