Thanks for the quick response Toby! Could I also apply this to a
dynamic table? The main page features a search engine which takes the
user's input and forwards it to a results page (containing this
table). So the results could have different information each time (for
example):

First Search Results
Column A | Column B | Column C
X              | 1             | a
               | 2             | b
Y             | 1             | c
              | 2             | d
              | 3             | e

Second Search Results
Column A | Column B | Column C
F              | 1             | a
G              | 1             | b
                | 2             | c
H             | 1             | d
               | 2             | e

Thanks again for your help!

On Sep 6, 4:59 am, Toby <[email protected]> wrote:
> yeah you should be able to do it..
>
> but the data has to be sorted though.. otherwise its gonna be quiet an
> adventure :)
>
> this is how i probably would do it:
>
> <table>
>  <tr>
>   <td class="noRepeat">X</td>
>   <td>1</a>
>   <td>a</td>
>  </tr>
>  <tr>
>   <td class="noRepeat">X</td>
>   <td>2</td>
>   <td>b</td>
>  </tr>
> </table>
>
> var thisHtml  = $(this).find('.noRepeat').html();
> var prevHtml = $(this).parent().prev().find('.noRepeat').html();
> if(thisHtml == prevHtml){ $(this).find('.noRepeat').html(''); }
>
> basically you have to go through the previous rows and see if they
> have the same value and then just remove the html content of the one
> who is looking... you should always start from the bottom row this
> way, otherwise you will just delete the second one and then the rest
> will still be the same...
>
> On Sep 6, 4:53 am, Joe0855 <[email protected]> wrote:
>
> > Hello,
>
> > I would like a table cell to appear empty, if it has the same value as
> > the cell above it.  For example, if my data is
>
> > X | 1 | a
>
> > X | 2 | b
>
> > Y | 1 | c
>
> > Y | 2 | d
>
> > Y | 3 | e
>
> > I would like to see
>
> > X | 1 | a
>
> >   | 2 | b
>
> > Y | 1 | c
>
> >   | 2 | d
>
> >   | 3 | e
>
> > I am a novice when it comes to programming. Any ideas? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to