CodePen

HTML

            
              <div class="parent">
  I should change my color to green when clicked
  <div class="element">I should do nothing when clicked</div>
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .parent {
  width:200px;
  height:200px;
  background: red;
  color: #fff;
}
.parent:active {
  background:green;
}
.element {
  background:blue;
}
  
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $('.element').click(function(e){
  e.stopPropagation();
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................