[jQuery] Re: Hide row if empty

2009-10-08 Thread Charlie Griefer
On Thu, Oct 8, 2009 at 5:10 PM, Wacko Jacko wrote: > > Hi There. Yeah, just did. Thanks for that! > > Why does my test using the same code not work :( > > http://www.noosabiosphere.org.au/tester.htm > Viewing the source, that isn't empty. it's got whitespace characters (spaces and/or tabs

[jQuery] Re: Hide row if empty

2009-10-08 Thread Wacko Jacko
Hi There. Yeah, just did. Thanks for that! Why does my test using the same code not work :( http://www.noosabiosphere.org.au/tester.htm On Oct 9, 8:46 am, Charlie wrote: > did you look at the working example on jsbin where the li is being hidden? > Wacko Jacko wrote:Thanks Bohdan. Tried th

[jQuery] Re: Hide row if empty

2009-10-08 Thread Charlie
did you look at the working example on jsbin where the li is being hidden? Wacko Jacko wrote: Thanks Bohdan. Tried that first. No luck. As I said, it will work if the parent is a div, but not if the parent of the div is an li. Thanks again. Jack On Oct 8, 5:56 pm, Bohdan Ganicky wrote:

[jQuery] Re: Hide row if empty

2009-10-08 Thread Wacko Jacko
Thanks Bohdan. Tried that first. No luck. As I said, it will work if the parent is a div, but not if the parent of the div is an li. Thanks again. Jack On Oct 8, 5:56 pm, Bohdan Ganicky wrote: > Hi, > > use .parent() instead of .parents() > > http://jsbin.com/isasi/ > > -- > Bohdan > > On Oct 8

[jQuery] Re: Hide row if empty

2009-10-08 Thread Bohdan Ganicky
Hi, use .parent() instead of .parents() http://jsbin.com/isasi/ -- Bohdan On Oct 8, 6:17 am, Wacko Jacko wrote: > I am having a bit of trouble with this one. Thanks for your help. I > could get it working if the parent is a but not if it's an . > > Here's my html: > > >         >         W

[jQuery] Re: Hide row if empty

2009-10-07 Thread Wacko Jacko
I am having a bit of trouble with this one. Thanks for your help. I could get it working if the parent is a but not if it's an . Here's my html: Why I am involved: {tag_why are you involved?} Current projects & activities: {tag_current pro

[jQuery] Re: Hide row if empty

2009-09-30 Thread Wacko Jacko
Brilliant! I will try this and get back to you.Thanks for your time! On Oct 1, 3:21 pm, Charlie Griefer wrote: > Assuming you can turn those id's into classes (where you have > id="database")... you can do the following: > > $(document).ready(function(){ >     $('ul .database').each(function() {

[jQuery] Re: Hide row if empty

2009-09-30 Thread Wacko Jacko
Hi Charlie, Thanks for your reply. I am using Business Catalyst (SaaS, hosted solution) so I can't do the php / ASP thang. I was using those id's only for reference purposes in this thread. Thanks. On Oct 1, 3:14 pm, Charlie Griefer wrote: > If you're working with server side data like that,

[jQuery] Re: Hide row if empty

2009-09-30 Thread Charlie Griefer
Assuming you can turn those id's into classes (where you have id="database")... you can do the following: $(document).ready(function(){ $('ul .database').each(function() { if ($(this).text() == "") { $(this).parent().hide(); } }); }); On Wed, Sep 30, 2009 at 10

[jQuery] Re: Hide row if empty

2009-09-30 Thread Charlie Griefer
If you're working with server side data like that, couldn't you just write a conditional in whatever language you're using (PHP, CF, ASP, etc) to not display the if no data? Also, do you really mean to re-use "database" as an ID for multiple elements? ID's ought to be unique. On Wed, Sep 30, 20