jQuery slide up and slide down -


by default questions displayed. on clicking 1 of questions related answer has displayed , other answers should hidden. (using slideup , slidedown methods ).

you should use jquery toggle function

 <button>toggle</button>     <div class="que">       <h4>your question one</h4>        <p>          answer one!!        </p>      </div>      <div class="que" style="display: none">         <h4>your question two</h4>         <p>           answer two!!         </p>    </div>      <script>        $( "button" ).click(function() {           $( ".que" ).toggle( "slow" );            });    </script> 

check here http://jsfiddle.net/k13oocfd/


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -