title: How can i write better my jquery code?
body: <p>i want better write my code. i am not pro coder. 
  i want member choice my offer form check services, 
  - service 1,2,3 same grup,
  - service 7,8,9,10,11,12,13 another grup,
  - and another single (4,5,6)</p>
  
  <p>i not know how better and short write like this code. thank you so much.</p>
  
  <p><strong>JSFIDDLE</strong></p>
  
  <p><a href="http://jsfiddle.net/elturko/v5rjE/" rel="nofollow">http://jsfiddle.net/elturko/v5rjE/</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input name="service[]" value="1" class="service_type" type="checkbox"&gt; service 1&lt;br /&gt;
  &lt;input name="service[]" value="2" class="service_type" type="checkbox"&gt; service 2&lt;br /&gt;
  &lt;input name="service[]" value="3" class="service_type" type="checkbox"&gt; service 3&lt;br /&gt;
  &lt;input name="service[]" value="4" class="service_type" type="checkbox"&gt; service 4&lt;br /&gt;
  &lt;input name="service[]" value="5" class="service_type" type="checkbox"&gt; service 5&lt;br /&gt;
  &lt;input name="service[]" value="6" class="service_type" type="checkbox"&gt; service 6&lt;br /&gt;
  &lt;input name="service[]" value="7" class="service_type" type="checkbox"&gt; service 7&lt;br /&gt;
  &lt;input name="service[]" value="8" class="service_type" type="checkbox"&gt; service 8&lt;br /&gt;
  &lt;input name="service[]" value="9" class="service_type" type="checkbox"&gt; service 9&lt;br /&gt;
  &lt;input name="service[]" value="10" class="service_type" type="checkbox"&gt; service 10&lt;br /&gt;
  &lt;input name="service[]" value="11" class="service_type" type="checkbox"&gt; service 11&lt;br /&gt;
  &lt;input name="service[]" value="12" class="service_type" type="checkbox"&gt; service 12&lt;br /&gt;
  &lt;input name="service[]" value="13" class="service_type" type="checkbox"&gt; service 13&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  
  
  &lt;div id="service123"&gt;service1 or service2 or service3&lt;/div&gt;
  &lt;div id="service4"&gt;service4&lt;/div&gt;
  &lt;div id="service5"&gt;service5&lt;/div&gt;
  &lt;div id="service6"&gt;service6&lt;/div&gt;
  &lt;div id="others"&gt;other services(7-13)&lt;/div&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>div{ display:none;}
  </code></pre>
  
  <p><strong>JAVASCRIPT</strong></p>
  
  <pre><code>var checked = [];
  $("input:checkbox[name=service[]]").live('click', function (){
      var $this = $(this), 
      h = $this.val();
  
      if ($this.is(':checked')) {
          checked.push(parseInt(h));
          if(h&lt;=3) $("#service123").show(); // 1,2,3 any one
          else if(h==4) $("#service4").show();
          else if(h==5) $("#service5").show();
          else if(h==6) $("#service6").show();
          else $("#others").show(); // 7-13 between
      }
      else{
          checked.splice(checked.indexOf(parseInt(h)),1);
          if((h &lt;=3) &amp;&amp; ($.inArray(1, checked) == -1 &amp;&amp; $.inArray(2, checked) == -1 &amp;&amp; $.inArray(3, checked) == -1)) $("#service123").hide();
          else if(h==4) $("#service4").hide();
          else if(h==5) $("#service5").hide();
          else if(h==6) $("#service6").hide();
          else if((7&gt;= h &lt;=13) &amp;&amp; ($.inArray(7, checked) == -1 &amp;&amp; $.inArray(8, checked) == -1 &amp;&amp; $.inArray(9, checked) == -1 &amp;&amp; $.inArray(10, checked) == -1 &amp;&amp; $.inArray(11, checked) == -1 &amp;&amp; $.inArray(12, checked) == -1 &amp;&amp; $.inArray(13, checked) == -1)) $("#others").hide();
      }
  });
  </code></pre>