Hi,

I apologize for the long post. I have been working on this for hours
and I dont know where to turn to...

I am working on a task list of sorts. Ungrouped Tasks are listed
individually at the top, followed by task groups:

Here is relevant html:

<!-- Individual Tasks -->
                                        <div class="Task complete" id="2" 
style="display:block">

                                                <div class="TaskName">
                                                        <div class="Data">
                                                                        
<h2>Work on stuff</h2>
                                                        </div>
                                                </div>

                                                <div class="TaskData">

                                                   <div 
class="Deadline">Deadline: 2007-09-23</div>

                                          </div><!-- id="TaskData" -->

                                        </div><!-- id="Task" -->

                                                <div class="Task incomplete" 
id="4" style="display:block">

                                                <div class="TaskName">
                                                        <div class="Data">
                                                                        
<h2>Call Jonathan Smith</h2>
                                                        </div>
                                                </div>

                                                <div class="TaskData">

                                                   <div 
class="Deadline">Deadline: 2007-10-04</div>

                                                        <div class="Notes">
                                                                        <div 
class="Entry">
                                                                                
<div class="Type">
                                                                                
        Note
                                                                                
</div>
                                                                                
<div class="Data">
                                                                                
        <p>
                                                                                
        Dont forget to do it!
                                                                                
        </p>
                                                                          </div>
                                                                  </div>
                                                          </div><!-- id="Notes" 
-->

                                          </div><!-- id="TaskData" -->
                                        </div><!-- id="Task" -->

<!-- Task Groups -->

                                                        <div 
class="ProjectGroup" id="5"><h1 id="Group-1">The First
Group</h1>
<div class="Task complete" id="2" style="display:block">

                                                <div class="TaskName">
                                                        <div class="Data">
                                                                        <h2>Get 
busy please</h2>
                                                        </div>
                                                </div>

                                                <div class="TaskData">

                                                   <div 
class="Deadline">Deadline: 2007-11-23</div>

                                          </div><!-- id="TaskData" -->
                                        </div><!-- id="Task" -->

                                                        </div><!-- 
id="ProjectGroup" -->


There are multiple groups that are setup like an accordian. All of
that works fine, I just cant seem to filter the tasks.

Here is the select code:
<div class="Filter">
     <p>Show:
       <select name="FilterShow" id="FilterSelect">
         <option value="0">Incomplete</option>
         <option value="1">Complete</option>
         <option value="All">All</option>
       </select>
               </p>
</div>

And of course from the the JQuery.ready() :

                                $("#FilterSelect").change( function() {

                                         switch ($(this).val())
                                          {
                                                case "0":       {
                                                                                
        $(".incomplete").livequery(function() {
                                                                                
                $(this).show();
                                                                                
        });
                                                                                
        $(".complete").livequery(function() {
                                                                                
                $(this).hide();
                                                                                
        });

                                                                                
}
                                                case "1":       {
                                                                                
        $(".incomplete").livequery(function() {
                                                                                
                $(this).hide();
                                                                                
        });
                                                                                
        $(".complete").livequery(function() {
                                                                                
                $(this).show();
                                                                                
        });
                                                                                
}
                                                case "All":     {
                                                                                
        $(".incomplete").livequery(function() {
                                                                                
                $(this).show();
                                                                                
        });
                                                                                
        $(".complete").livequery(function() {
                                                                                
                $(this).show();
                                                                                
        });
                                                                                
}
                                          }


                                });

Reply via email to