Avoid sliding animation of content when button is clicked












0















I have the following simple slideToggle in jQuery which you can also find in the JSFiddle here :






$(document).ready(function() {
$(".panel_button").on('click', function() {
$(".panel").slideUp();
var targetPanel = $(this).attr('data-target');
$(targetPanel).slideToggle(0);
$(this).toggleClass('active');
});
});

body {
height: 500px;
}

.contents {
width: 100%;
height: 20%;
}

.buttons {
background-color: green;
float: left;
width: 100%;
}

.panel_button {
float: left;
width: 30%;
}

#panel1, #panel2, #panel3 {
background-color: blue;
float: left;
width: 100%;
display: none;
}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="contents">

<div id="panel1" class="panel">
<div class="content_01a">Here goes content1a</div>
<div class="content_01b">Here goes content1b</div>
</div>

<div id="panel2" class="panel">
<div class="content_02a">Here goes content2a</div>
<div class="content_02b">Here goes content2b</div>
<div class="content_02c">Here goes content2c</div>
</div>

<div id="panel3" class="panel">
<div class="content_03a">Here goes content3a</div>
<div class="content_03b">Here goes content3b</div>
</div>

</div>

<div class="buttons">
<div class="panel_button" data-target="#panel1"> Button_01 </div>
<div class="panel_button" data-target="#panel2"> Button_02 </div>
<div class="panel_button" data-target="#panel3"> Button_03 </div>
</div>





As you can see in the code above I display/hide contents depending on the button which is pushed.
All this works fine so far.





However, I want to change the animation of the "incoming" content once the button is clicked.

Right now when you click on a button the new content somehow is sliding in from below and covers the previous content. However, I just want that the content is switched immediately when the button is clicked without the "sliding". Therefore, I put 0 on the slideToggle but it does not work.



Do you have any idea what I need to change in my code to make this work?










share|improve this question



























    0















    I have the following simple slideToggle in jQuery which you can also find in the JSFiddle here :






    $(document).ready(function() {
    $(".panel_button").on('click', function() {
    $(".panel").slideUp();
    var targetPanel = $(this).attr('data-target');
    $(targetPanel).slideToggle(0);
    $(this).toggleClass('active');
    });
    });

    body {
    height: 500px;
    }

    .contents {
    width: 100%;
    height: 20%;
    }

    .buttons {
    background-color: green;
    float: left;
    width: 100%;
    }

    .panel_button {
    float: left;
    width: 30%;
    }

    #panel1, #panel2, #panel3 {
    background-color: blue;
    float: left;
    width: 100%;
    display: none;
    }

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div class="contents">

    <div id="panel1" class="panel">
    <div class="content_01a">Here goes content1a</div>
    <div class="content_01b">Here goes content1b</div>
    </div>

    <div id="panel2" class="panel">
    <div class="content_02a">Here goes content2a</div>
    <div class="content_02b">Here goes content2b</div>
    <div class="content_02c">Here goes content2c</div>
    </div>

    <div id="panel3" class="panel">
    <div class="content_03a">Here goes content3a</div>
    <div class="content_03b">Here goes content3b</div>
    </div>

    </div>

    <div class="buttons">
    <div class="panel_button" data-target="#panel1"> Button_01 </div>
    <div class="panel_button" data-target="#panel2"> Button_02 </div>
    <div class="panel_button" data-target="#panel3"> Button_03 </div>
    </div>





    As you can see in the code above I display/hide contents depending on the button which is pushed.
    All this works fine so far.





    However, I want to change the animation of the "incoming" content once the button is clicked.

    Right now when you click on a button the new content somehow is sliding in from below and covers the previous content. However, I just want that the content is switched immediately when the button is clicked without the "sliding". Therefore, I put 0 on the slideToggle but it does not work.



    Do you have any idea what I need to change in my code to make this work?










    share|improve this question

























      0












      0








      0








      I have the following simple slideToggle in jQuery which you can also find in the JSFiddle here :






      $(document).ready(function() {
      $(".panel_button").on('click', function() {
      $(".panel").slideUp();
      var targetPanel = $(this).attr('data-target');
      $(targetPanel).slideToggle(0);
      $(this).toggleClass('active');
      });
      });

      body {
      height: 500px;
      }

      .contents {
      width: 100%;
      height: 20%;
      }

      .buttons {
      background-color: green;
      float: left;
      width: 100%;
      }

      .panel_button {
      float: left;
      width: 30%;
      }

      #panel1, #panel2, #panel3 {
      background-color: blue;
      float: left;
      width: 100%;
      display: none;
      }

      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <div class="contents">

      <div id="panel1" class="panel">
      <div class="content_01a">Here goes content1a</div>
      <div class="content_01b">Here goes content1b</div>
      </div>

      <div id="panel2" class="panel">
      <div class="content_02a">Here goes content2a</div>
      <div class="content_02b">Here goes content2b</div>
      <div class="content_02c">Here goes content2c</div>
      </div>

      <div id="panel3" class="panel">
      <div class="content_03a">Here goes content3a</div>
      <div class="content_03b">Here goes content3b</div>
      </div>

      </div>

      <div class="buttons">
      <div class="panel_button" data-target="#panel1"> Button_01 </div>
      <div class="panel_button" data-target="#panel2"> Button_02 </div>
      <div class="panel_button" data-target="#panel3"> Button_03 </div>
      </div>





      As you can see in the code above I display/hide contents depending on the button which is pushed.
      All this works fine so far.





      However, I want to change the animation of the "incoming" content once the button is clicked.

      Right now when you click on a button the new content somehow is sliding in from below and covers the previous content. However, I just want that the content is switched immediately when the button is clicked without the "sliding". Therefore, I put 0 on the slideToggle but it does not work.



      Do you have any idea what I need to change in my code to make this work?










      share|improve this question














      I have the following simple slideToggle in jQuery which you can also find in the JSFiddle here :






      $(document).ready(function() {
      $(".panel_button").on('click', function() {
      $(".panel").slideUp();
      var targetPanel = $(this).attr('data-target');
      $(targetPanel).slideToggle(0);
      $(this).toggleClass('active');
      });
      });

      body {
      height: 500px;
      }

      .contents {
      width: 100%;
      height: 20%;
      }

      .buttons {
      background-color: green;
      float: left;
      width: 100%;
      }

      .panel_button {
      float: left;
      width: 30%;
      }

      #panel1, #panel2, #panel3 {
      background-color: blue;
      float: left;
      width: 100%;
      display: none;
      }

      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <div class="contents">

      <div id="panel1" class="panel">
      <div class="content_01a">Here goes content1a</div>
      <div class="content_01b">Here goes content1b</div>
      </div>

      <div id="panel2" class="panel">
      <div class="content_02a">Here goes content2a</div>
      <div class="content_02b">Here goes content2b</div>
      <div class="content_02c">Here goes content2c</div>
      </div>

      <div id="panel3" class="panel">
      <div class="content_03a">Here goes content3a</div>
      <div class="content_03b">Here goes content3b</div>
      </div>

      </div>

      <div class="buttons">
      <div class="panel_button" data-target="#panel1"> Button_01 </div>
      <div class="panel_button" data-target="#panel2"> Button_02 </div>
      <div class="panel_button" data-target="#panel3"> Button_03 </div>
      </div>





      As you can see in the code above I display/hide contents depending on the button which is pushed.
      All this works fine so far.





      However, I want to change the animation of the "incoming" content once the button is clicked.

      Right now when you click on a button the new content somehow is sliding in from below and covers the previous content. However, I just want that the content is switched immediately when the button is clicked without the "sliding". Therefore, I put 0 on the slideToggle but it does not work.



      Do you have any idea what I need to change in my code to make this work?






      $(document).ready(function() {
      $(".panel_button").on('click', function() {
      $(".panel").slideUp();
      var targetPanel = $(this).attr('data-target');
      $(targetPanel).slideToggle(0);
      $(this).toggleClass('active');
      });
      });

      body {
      height: 500px;
      }

      .contents {
      width: 100%;
      height: 20%;
      }

      .buttons {
      background-color: green;
      float: left;
      width: 100%;
      }

      .panel_button {
      float: left;
      width: 30%;
      }

      #panel1, #panel2, #panel3 {
      background-color: blue;
      float: left;
      width: 100%;
      display: none;
      }

      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <div class="contents">

      <div id="panel1" class="panel">
      <div class="content_01a">Here goes content1a</div>
      <div class="content_01b">Here goes content1b</div>
      </div>

      <div id="panel2" class="panel">
      <div class="content_02a">Here goes content2a</div>
      <div class="content_02b">Here goes content2b</div>
      <div class="content_02c">Here goes content2c</div>
      </div>

      <div id="panel3" class="panel">
      <div class="content_03a">Here goes content3a</div>
      <div class="content_03b">Here goes content3b</div>
      </div>

      </div>

      <div class="buttons">
      <div class="panel_button" data-target="#panel1"> Button_01 </div>
      <div class="panel_button" data-target="#panel2"> Button_02 </div>
      <div class="panel_button" data-target="#panel3"> Button_03 </div>
      </div>





      $(document).ready(function() {
      $(".panel_button").on('click', function() {
      $(".panel").slideUp();
      var targetPanel = $(this).attr('data-target');
      $(targetPanel).slideToggle(0);
      $(this).toggleClass('active');
      });
      });

      body {
      height: 500px;
      }

      .contents {
      width: 100%;
      height: 20%;
      }

      .buttons {
      background-color: green;
      float: left;
      width: 100%;
      }

      .panel_button {
      float: left;
      width: 30%;
      }

      #panel1, #panel2, #panel3 {
      background-color: blue;
      float: left;
      width: 100%;
      display: none;
      }

      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <div class="contents">

      <div id="panel1" class="panel">
      <div class="content_01a">Here goes content1a</div>
      <div class="content_01b">Here goes content1b</div>
      </div>

      <div id="panel2" class="panel">
      <div class="content_02a">Here goes content2a</div>
      <div class="content_02b">Here goes content2b</div>
      <div class="content_02c">Here goes content2c</div>
      </div>

      <div id="panel3" class="panel">
      <div class="content_03a">Here goes content3a</div>
      <div class="content_03b">Here goes content3b</div>
      </div>

      </div>

      <div class="buttons">
      <div class="panel_button" data-target="#panel1"> Button_01 </div>
      <div class="panel_button" data-target="#panel2"> Button_02 </div>
      <div class="panel_button" data-target="#panel3"> Button_03 </div>
      </div>






      jquery html css






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 10:22









      MichiMichi

      1,1351024




      1,1351024
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You can use hide() instead of slideUp() and show() instead of slideToggle():






          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>








          share|improve this answer
























          • Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

            – Michi
            Nov 21 '18 at 10:28











          • @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

            – Mark
            Nov 21 '18 at 10:34








          • 1





            Yeah, I already wanted to but still have to wait a few minutes.

            – Michi
            Nov 21 '18 at 10:35











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409913%2favoid-sliding-animation-of-content-when-button-is-clicked%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You can use hide() instead of slideUp() and show() instead of slideToggle():






          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>








          share|improve this answer
























          • Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

            – Michi
            Nov 21 '18 at 10:28











          • @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

            – Mark
            Nov 21 '18 at 10:34








          • 1





            Yeah, I already wanted to but still have to wait a few minutes.

            – Michi
            Nov 21 '18 at 10:35
















          0














          You can use hide() instead of slideUp() and show() instead of slideToggle():






          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>








          share|improve this answer
























          • Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

            – Michi
            Nov 21 '18 at 10:28











          • @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

            – Mark
            Nov 21 '18 at 10:34








          • 1





            Yeah, I already wanted to but still have to wait a few minutes.

            – Michi
            Nov 21 '18 at 10:35














          0












          0








          0







          You can use hide() instead of slideUp() and show() instead of slideToggle():






          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>








          share|improve this answer













          You can use hide() instead of slideUp() and show() instead of slideToggle():






          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>








          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>





          $(document).ready(function() {
          $(".panel_button").on('click', function() {
          $(".panel").hide();
          var targetPanel = $(this).attr('data-target');
          $(targetPanel).show();
          $(this).toggleClass('active');
          });
          });

          body {
          height: 500px;
          }

          .contents {
          width: 100%;
          height: 20%;
          }

          .buttons {
          background-color: green;
          float: left;
          width: 100%;
          }

          .panel_button {
          float: left;
          width: 30%;
          }

          #panel1, #panel2, #panel3 {
          background-color: blue;
          float: left;
          width: 100%;
          display: none;
          }

          <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
          <div class="contents">

          <div id="panel1" class="panel">
          <div class="content_01a">Here goes content1a</div>
          <div class="content_01b">Here goes content1b</div>
          </div>

          <div id="panel2" class="panel">
          <div class="content_02a">Here goes content2a</div>
          <div class="content_02b">Here goes content2b</div>
          <div class="content_02c">Here goes content2c</div>
          </div>

          <div id="panel3" class="panel">
          <div class="content_03a">Here goes content3a</div>
          <div class="content_03b">Here goes content3b</div>
          </div>

          </div>

          <div class="buttons">
          <div class="panel_button" data-target="#panel1"> Button_01 </div>
          <div class="panel_button" data-target="#panel2"> Button_02 </div>
          <div class="panel_button" data-target="#panel3"> Button_03 </div>
          </div>






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 '18 at 10:26









          MarkMark

          3,64721126




          3,64721126













          • Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

            – Michi
            Nov 21 '18 at 10:28











          • @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

            – Mark
            Nov 21 '18 at 10:34








          • 1





            Yeah, I already wanted to but still have to wait a few minutes.

            – Michi
            Nov 21 '18 at 10:35



















          • Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

            – Michi
            Nov 21 '18 at 10:28











          • @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

            – Mark
            Nov 21 '18 at 10:34








          • 1





            Yeah, I already wanted to but still have to wait a few minutes.

            – Michi
            Nov 21 '18 at 10:35

















          Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

          – Michi
          Nov 21 '18 at 10:28





          Cool. Thanks a lot for your answer. I also updated it here jsfiddle.net/koanfw15/21

          – Michi
          Nov 21 '18 at 10:28













          @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

          – Mark
          Nov 21 '18 at 10:34







          @Michi You're welcome, could you mark this answer as accepted if this solved your issue?

          – Mark
          Nov 21 '18 at 10:34






          1




          1





          Yeah, I already wanted to but still have to wait a few minutes.

          – Michi
          Nov 21 '18 at 10:35





          Yeah, I already wanted to but still have to wait a few minutes.

          – Michi
          Nov 21 '18 at 10:35


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409913%2favoid-sliding-animation-of-content-when-button-is-clicked%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?