Posts

Showing posts from December 29, 2018

Display/Hide content above buttons on click

Image
1 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 () { $(this).next('.panel').slideToggle(0); $(this).toggleClass('active'); }); }); .buttons { background-color: green; float: left; width: 100%; } .panel_button { float: left; width: 30%; } .panel { 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="panel"> <div class="content_01a">Here goes content1a</div> <div class="content_01b&quo