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>
            
          
!

CSS

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

JS

            
              $('.element').mousedown(function(e){
  e.stopPropagation();
});

$('.parent').mousedown(function(e){
  $('.parent').css('background', 'green')
    }).mouseup(function(e){
  $('.parent').css('background', 'red')
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................