title: jQuery: style hover on parents() and children()
body: <p>I am wondering if it is possible to change the style of child when its element was hovered, while its css was also styled when its parent was hovered? </p>
  
  <p>To make my question clear, I wrote down a basic code below:</p>
  
  <pre><code>   //styling child while mouse is inside child element
  $('child').on('hover', function(e){
     if (e.type == 'mouseenter'){
        $(this).css('background','yellow');
     }
  })
  
     // styling child while mouse is inside parent
  $('child').parents().on('hover', function (e){
     if (e.type == 'mouseenter'){
        $(this).css('background', 'blue');
     }
  })
  </code></pre>
  
  <p>So, basically once user enters space of parent to make child's bg blue, and once it enters space of child to change from blue to yellow bg.</p>
  
  <hr>
  
  <p><em>I saw a comment on why I do not use css, so this is a little explanation: I am unable to select parent element. I can only do it from child using parents(). And as long as css does not support parents() method yet I went with jquery. :)</em></p>