Grr, well that didn't work. But I understand the basic premise of it,
so thank you.

-v

On Sep 30, 9:55 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
> Try an ugly filter function:
>
> $(".bc-wrapper").filter(function(){
>     return !/^\s+$/.test(this.textContent); // "\s" is a shorthand for
> whitespace/line breaks
>
> }).parent().addClass("none");
>
> This will exclude from your selector all elements that have only
> whitespace in it. Be weary that regexes are slow, you don't want this
> code looping over a thousand elements.
>
> - ricardo
>
> On Sep 30, 8:56 pm, Vinoj <[EMAIL PROTECTED]> wrote:
>
> > @Michael Geary -- Thanks, now I get it. But the code is being output
> > by a CMS, which has some whitespace that is output. So then truncate
> > the whitespace?
> > @FrenchilNLA -- It seemed to make sense, but this didn't work as long
> > as I had that extra space. Once I took out the whitespace that Michael
> > Geary spoke of, it worked. Is there a way to basically have the :empty
> > selector work and ignore whitespace?
>
> > Thanks from both of you for responding, I really appreciate it.

Reply via email to