title: Special effect on parsley min check error message, Rails 4
body: <p>I am creating simple app with registration, that consists of multiple field types - string, text, check-boxes etc.</p>
  
  <p>I added <a href="http://parsleyjs.org/doc/examples/simple.html" rel="nofollow">parsley</a>  to display errors if any.  That works great.
  But now I want to change color for heading when error happens - specially when parsley-min-check triggers it.</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;div class="col-lg-3"&gt; 
      Services
      &lt;hr&gt;          
    &lt;div class="services-heading"&gt;  (Minimum*3)  &lt;/div&gt;
  
      &lt;div class="services-reg"&gt;
  
       &lt;% @services.each do |service| %&gt;
         &lt;li&gt;
  
              &lt;%= check_box_tag 'service_ids[]', service.id, false, :'data-parsley-mincheck'=&gt;3,:required =&gt; true%&gt;
           &lt;%= h service.name%&gt;                       
         &lt;/li&gt;               
  
  
       &lt;% end %&gt;
     &lt;/div&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>Now I am trying to trigger script when  desired div (services-reg) consists of parsley error message.</p>
  
  <pre><code> $(document).ready(function() {
      if ( $( ".services-reg  &gt; li.parsley-error").length ) {
  
          $(".services-heading &gt; p").css("color", "red");
      }   
   });
  </code></pre>
  
  <p>but something isn't working as expected.
  Console don't show any error message.</p>
  
  <p>Thanks in advance for your time.</p>