Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  
<div class="block-shirt">
  
   <div class="tee"></div>
  
   <div class="social-like"></div>
  
</div>
  
  
  
</body>
</html>
 
.block-shirt{
    float:left;
    width:133px;
    height:170px;
    border:1px solid;
    background-color:red;
}
.tee
{
    position:absolute;
    left:22px;
    margin-top:20px;
    width:103px;
    
    height:130px;
    border:1px solid;
  background-color:green;
}
.social-like
{
    position:absolute;
    left:35px;
    margin-top:45px;
    width:75px;
    
    height:80px;
    border:1px solid;
    background-color:yellow;
}
 
$(function(){
  $('body').on('click', 'div', function(e){
      var getClass = $(this).attr('class');
    
    if(getClass == "tee")
    {
      //do-nothing
      e.preventDefault();
    }
    else
    {
      alert('click');
    }
    e.stopPropagation();
  });
  
  
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers