Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<!-- Select this-->
<div class="thumbnails" ></div>
<!-- And this-->
<div class="thumbnails" > </div>
<!-- but not this -->
<div class="thumbnails" >please, not select me</div>
 
div{
  height:100px; 
  width:100px;
  margin:10px;
  border: 1px solid #ccc
}
.selected{
  background: #f00;
.selected:before{
  content: "Selected OK";
}
 
    $('.thumbnails').filter(function(i,v){
        return $.trim($(v).text()).length == 0;
    }).css('background-color', "#f0f");
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers