Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <style>
    li {
      color: grey;
      font: effra;
      font-weight: bold;
    }
    a:hover { 
      color: #aaaaaa;
      cursor: pointer;
    }
    
    .active, .active-start{
      color: orange;
    }
    .display{
      display: none;
    }
    .display-start{
      display: block;
    }
    #text{
      display:block;
    }
  </style>
</head>
<body>
  
  <div id="wrap">
    <ul id="divtoggle">
        <li><a class="title" id="title-1">Vlogging</a></li>
        <li><a class="title" id="title-2"> Filmmaking</a></li>
        <li><a class="title" id="title-3"> Beme</a></li>
    </ul>
    <div class="text">
        <div class='display' id="detail-1">Details 1</div>
        <div class='display' id="detail-2">Details 2</div>
        <div class='display' id="detail-3">Details 3</div>
    </div>
  </div>
  
  
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</body>
</html>
 
$(document).ready(function() {
  
   $(".title").click(function() {
     
     //*** get id
     var id = $(this).attr("id").split("-")[1];
     if (typeof id != "undefined"){
       
       //*** hide other descriptions and show yours
       $(".display").hide();
       $("#detail-" + id).show();
     }
     
   });
  
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers