Home>

In the following code, when "Ah" is displayed, clicking "Yes" automatically hides "Ah" and "Yes" is displayed. I want to Please give me a professor.

Ah 
 Yes 

<p>
Ah
</p>


<p>
Good
</p>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
function toggle1 () {
  $('. toggle-box1'). slideToggle ('slow');
}
</script>
<script>
function toggle2 () {
  $('. toggle-box2'). slideToggle ('slow');
}
</script>
  • Answer # 1

    It's not like jQuery

    
     Oh 
     Yes 
    

    Ah

    Good

    Hide first
    
     Oh 
     Yes 
    

    Ah

    Good

Related articles