Membuat Efek Accordion/Collapse Dengan Bootstrap


Assalamualaikum, semoga dalam keadaan sehat selalu pembaca. Kali ini saya akan membahas  bagaimana caranya membuat efek atau konten collapse menggunakan bootstrap.

Tampilan standar jika di klik tombol View Details maka akan muncul konten yang akan dimunculkan.

collapse1collapse2

Bagaimana membuatnya? Anda dapat copy paste source code dibawah ini :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Menu Collapse</title>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class=container>
<div class="row">
<div class="collapse-group">
<h2>Heading</h2>
<h2 class="collapse" id="viewdetails">Duniagama.wordpress.com</h2>
<a class="btn btn-info" data-toggle="collapse" data-target="#viewdetails">View details &raquo;</a></div>
</div>
</div>
</body>
</html>

Download : [Mediafire] [Dropbox]

Demo

Semoga bermanfaat

Jika ada masalah hubungi admin melalui : Facebook | WA { +6285273357370 }

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s