Apa itu collapsible dan bagaimana cara membuatnya Bisanya saya menyebutnya collapsible ini dengan sebutan plugin, karena dengan kita menggunakan collapsible ini, kita akan membuat penjelasan dengan rapi, dimana penjelasan atau deskripsi tersebut akan muncul ketika di klik judulnya, layaknya seperti menu dropown, tetapi jika collapsible ini yang keluar deskripsinya bukan sub menunya, Oke jangan kemana-mana simak terus ya teman-teman.

Untuk belajar apa itu collapsible dan bagaimana cara membuatnya, saya masih menggunakan library materialize ya teman-teman, teman-teman bisa langsung kunjungi, dan saya harap teman-teman sudah paham menggunakan materialize ini ya, jika belum teman-teman bisa lihat di artikel sebelumnya atau search saja di google bagaimana cara menggunakan materialize, mudah ko teman-teman, oke langsung saja bagaimana cara membuatnya:

  <!DOCTYPE html>
  <html>
    <head>
    	<title>Apa itu Collapsible dan Bagaimana Cara Membuatnya</title>
      <!--Import Google Icon Font-->
      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
      <!--Import materialize.css-->
      <link type="text/css" rel="stylesheet" href="css/materialize.min.css"  media="screen,projection"/>
      <!--Let browser know website is optimized for mobile-->
      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
      <-e-style type="text/css">
      	.container{
      		width: 1000px;
      		margin: auto;
      	}
      </style>
    </head>
    <body>
   	<div class="container">
   	  <h1>Apa itu Collapsible dan Bagaimana Cara Membuatnya</h1>
	  <ul class="collapsible" data-collapsible="accordion">
      <li>
        <div class="collapsible-header"><i class="material-icons">monetization_on</i>Mata uang</div>
        <div class="collapsible-body"><span>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.</span></div>
      </li>
      <li>
        <div class="collapsible-header"><i class="material-icons">local_atm</i>Kenapa Harus ada mata uang</div>
        <div class="collapsible-body"><span>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, l</span></div>
      </li>
      <li>
        <div class="collapsible-header"><i class="material-icons">star</i>Mata uang apa yang ada di indonesia</div>
        <div class="collapsible-body"><span>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
        </span></div>
      </li>
    </ul>
	  <p>
	  </p>
      <!--Import jQuery before materialize.js-->
       <-e-script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
       <-e-script type="text/javascript" src="js/materialize.min.js"></script>
	    <-e-script type="text/javascript">
	      $(document).ready(function(){
          $('.collapsible').collapsible();
        });
	    <-e-/script>
     </div>
    </body>
  </html>

teman-teman perhatikan

 <ul class="collapsible" data-collapsible="accordion">
    <li>
      <div class="collapsible-header"><i class="material-icons">filter_drama</i>First</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-header"><i class="material-icons">place</i>Second</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
    <li>
      <div class="collapsible-header"><i class="material-icons">whatshot</i>Third</div>
      <div class="collapsible-body"><span>Lorem ipsum dolor sit amet.</span></div>
    </li>
  </ul>

Untuk tampilannya, dan scriptnya seperti ini:

  $(document).ready(function(){
    $('.collapsible').collapsible();
  });
        /**
 * Insert your code here
 */

Jadi teman-teman tinggal copy saja dan seperti ini lah hasilnya:

 apa itu collapsible dan bagaimana cara membuatnya

Bisa di lihat ketika saya mengklik mata uang, maka deskripsinya akan muncul di bawah ketika saya klik lagi maka akan terturup, lebih rapi dan bagus ya teman-teman oke saya rasa cukup sampai disini dulu belajar kita tentang apa itu collapsible dan bagaimana cara membuatnya, sampai berjumpa pada artikel selanjutnya terimakasih.