Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Title</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  
  
  .cardapio-menu{
  
    background:#eee;
    padding:15px;
    border-radius:10px;
    margin:4px;
  
  }
  
</style>
</head>
<body>
  
  <div class="cardapio-content">
    <h5>Tittle of tab 1</h5>
    <p>Content of tab 1</p>
    <h5>Tittle of tab 2</h5>
    <p>Content of tab 2</p>
    <h5>Tittle of tab 3</h5>
    <p>Content of tab 3</p>
  </div>
  
  
</body>
</html>
 
var card = $('<div class="cardapio-menu" />');
$('.cardapio-content h5').each(function(){
  $(this).next('p').andSelf().wrapAll(card);
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers