title: Jquery code not working on site but does in fiddle
body: <p>I have a list of inputs that has several parents div and then multiple children checkboxes under each parent. there is only 1 level of children.(see links below)</p>
  
  <p>Under each parent I have check boxes (MUST USE checkboxes, rather than radio buttons) and should only allow a single selection of the children within each parent.</p>
  
  <p>I am using the following code on within a fiddle - and it works OK, but applying this to the application is failing, yet there are no error chrome shows to debug what is going on...</p>
  
  <pre><code>$('input[type=checkbox]').click(function () {
      var checkedState = $(this).attr("checked");
      $(this).parent().parent().parent().parent().parent().find('input[type=checkbox]:checked').removeAttr("checked");
      $(this).attr("checked", checkedState);
  });
  </code></pre>
  
  <p>A working example of what I am trying to achieve can be found here: <a href="http://jsfiddle.net/EYtx8/" rel="nofollow">http://jsfiddle.net/EYtx8/</a></p>
  
  <p>The dev site that's not working can be found here: <a href="http://protoys.gentex.com.au/Products/Catalogue" rel="nofollow">http://protoys.gentex.com.au/Products/Catalogue</a> (The page load is slow, I know), you will note that all check boxes can be selected, which is what I am trying to avoid.</p>
  
  <p>As a side note people have mentioned that its not within the DOM. but a wrapped in a</p>
  
  <pre><code>$(document).ready(function() { 
  </code></pre>
  
  <p>Here is the full script on the dev site</p>
  
  <pre><code>&lt;script&gt;
  
  $(document).ready(function() {
  
  //Update the is in stock flag, by altering the criteria input fields.
  $("input[[id*='chkInStock']]").change(function() {
      if ($("input[[id*='chkInStock']]").prop('checked') == true) $("input[[id*='nbs-min']]").val('1');
      if ($("input[[id*='chkInStock']]").prop('checked') == false) $("input[[id*='nbs-min']]").val('0');
  });
  
  if ('[Settings:chktextsearch]'=='False')
  {
      // ALL Text search is turned off in the settings, so use JS to update the "disabledsearchtokens" for all text search tokens --&gt;
      var disabledlist = $("input[[id*='disabledsearchtokens']]").val();
      if (disabledlist.indexOf('search0;') == -1) disabledlist = disabledlist + 'search0;';
      if (disabledlist.indexOf('search1;') == -1) disabledlist = disabledlist + 'search1;';
      if (disabledlist.indexOf('search2;') == -1) disabledlist = disabledlist + 'search2;';
      if (disabledlist.indexOf('search3;') == -1) disabledlist = disabledlist + 'search3;';
      if (disabledlist.indexOf('search4;') == -1) disabledlist = disabledlist + 'search4;';
      if (disabledlist.indexOf('search5;') == -1) disabledlist = disabledlist + 'search5;';
      if (disabledlist.indexOf('search6;') == -1) disabledlist = disabledlist + 'search6;';
      if (disabledlist.indexOf('search7;') == -1) disabledlist = disabledlist + 'search7;';
      if (disabledlist.indexOf('search8;') == -1) disabledlist = disabledlist + 'search8;';
      // Update disabled fields to the postback field --&gt;
      $("input[[id*='disabledsearchtokens']]").val(disabledlist);
     }
  
     $('input[type=checkbox]').click(function () {
        var checkedState = $(this).attr("checked");           
  
       $(this).parent().parent().parent().parent().parent().find('input[type=checkbox]:checked').removeAttr("checked");
     $(this).attr("checked", checkedState);
      });
  
      $('label').each(function () {
         var $this = $(this);
        $this.html($this.text().replace(/^(\.+)/g, '&lt;span style="display:none"&gt;$1&lt;/span&gt;&lt;span     class="Child"&gt;'));
           });
       });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>Any help would be appreciated.</p>