Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="package_caption">
     <ul>
       <li>Test</li>
       <li>Test Big and big</li>
       <li>Test</li>
    </ul>    
  </div>
</body>
</html>
 
  function prepareList() {
    
    
    
  $('.package_caption').find('ul').find('li')
        .click( function(event) {
        if (this == event.target) {
            $(this).toggleClass('expanded');
            $(this).children('ul').toggle('medium');
        }
        return false;
    })
    .addClass('collapsed')
        .children('ul').hide();
}
  $(document).ready( function() {
    
        var lis=$('.package_caption').find('ul').find('li');
    $.each(lis,function(ind,item){
      
       if($(this).text().length>5)
         {
          
           $(this).text("+");
         }
    });
    
    
    prepareList();
  });
Output 300px

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

Dismiss x
public
Bin info
kshyjupro
0viewers