title: Javascript list.js to this php code
body: <p>I love this script list.js from <a href="http://www.listjs.com" rel="nofollow">www.listjs.com</a>. It seems to be the perfect fit for searching and filtering the output of a php file below, but I just can get it to work, I only need to add 7 or so lines of code but its not working. Can anyone tell me how come? Thanks</p>
  
  <p>The code that I added is highlighted</p>
  
  <pre><code>&lt;?php
  defined('_JEXEC') or die();
  ?&gt;
  **&lt;script type="text/javascript" src="list.js"&gt;&lt;/script&gt;**
  &lt;form action="&lt;?php echo CRoute::getURI(); ?&gt;" method="post" id="jomsForm" name="jomsForm" class="community-form-validate"&gt;
  &lt;div class="jsProfileType" **id="jsProfileType"**&gt;
      **&lt;input class="search" placeholder="Search" /&gt;
          &lt;button class="sort" data-sort="label"&gt;
              Sort
          &lt;/button&gt;**
      &lt;ul class="unstyled"&gt;
      &lt;?php
          foreach($profileTypes as $profile)
          {
      ?&gt;
          &lt;li class="space-12"&gt;
  
              &lt;label for="profile-&lt;?php echo $profile-&gt;id;?&gt;" class="radio"&gt;
                  &lt;input id="profile-&lt;?php echo $profile-&gt;id;?&gt;" type="radio" value="&lt;?php echo $profile-&gt;id;?&gt;" name="profileType" &lt;?php echo $default == $profile-&gt;id ? ' disabled CHECKED' :'';?&gt; /&gt;
                &lt;strong class="bold"&gt;&lt;?php echo $profile-&gt;name;?&gt;&lt;/strong&gt;
              &lt;/label&gt;
              &lt;?php if( $profile-&gt;approvals ){?&gt;
                  &lt;span class="help-block"&gt;&lt;?php echo JText::_('COM_COMMUNITY_REQUIRE_APPROVAL');?&gt;&lt;/span&gt;
              &lt;?php } ?&gt;
  
              &lt;span class="help-block"&gt;
                  &lt;?php 
                      $profile-&gt;description = JHTML::_('content.prepare',$profile-&gt;description);
                      echo $profile-&gt;description;?&gt;
              &lt;/span&gt;
  
              &lt;?php if( $default == $profile-&gt;id ){?&gt;
                      &lt;em&gt;&lt;?php echo JText::_('COM_COMMUNITY_ALREADY_USING_THIS_PROFILE_TYPE');?&gt;&lt;/em&gt;
              &lt;?php } ?&gt;
  
  
  
          &lt;/li&gt;
      &lt;?php
          }
      ?&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  &lt;?php if( (count($profileTypes) == 1 &amp;&amp; $profileTypes[0]-&gt;id != $default) || count($profileTypes) &gt; 1 ){?&gt;
  &lt;div style="margin-top: 5px;"&gt;
      &lt;?php if( $showNotice ){ ?&gt;
      &lt;span style="color: red;font-weight:700;"&gt;&lt;?php echo JText::_('COM_COMMUNITY_NOTE');?&gt;:&lt;/span&gt;
      &lt;span&gt;&lt;?php echo $message;?&gt;&lt;/span&gt;
      &lt;?php } ?&gt;
  &lt;/div&gt;
  **&lt;script&gt;
  var options = {
      list: "space-12"
  };
  var userList = new List('jsProfileType', options);
  &lt;/script&gt;**
  &lt;table class="ccontentTable paramlist" cellspacing="1" cellpadding="0"&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td class="paramlist_key" style="text-align:left"&gt;
              &lt;div id="cwin-wait" style="display:none;"&gt;&lt;/div&gt;
              &lt;input class="btn btn-primary validateSubmit" type="submit" id="btnSubmit" value="&lt;?php echo JText::_('COM_COMMUNITY_NEXT'); ?&gt;" name="submit"&gt;
          &lt;/td&gt;
          &lt;td class="paramlist_value"&gt;
  
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;?php } ?&gt;
  &lt;input type="hidden" name="id" value="0" /&gt;
  &lt;input type="hidden" name="gid" value="0" /&gt;
  &lt;input type="hidden" id="authenticate" name="authenticate" value="0" /&gt;
  &lt;input type="hidden" id="authkey" name="authkey" value="" /&gt;
  &lt;/form&gt;
  </code></pre>