The .not and .filter methods only run against the matched elements within
the jQuery collection. In order to filter all elements you will need to add
all elements to the collection. I think something like this should work
(untested).

$('*', data).andSelf().not('style, meta, link, script, title, img');

andSelf is a jQuery 1.2 method. If you are using an earlier version you
could use $('*', data).add(data)

--
Brandon Aaron

On 9/22/07, Pops <[EMAIL PROTECTED]> wrote:
>
>
> I noticed some example using something like so:
>
>   data = $(data).not("style, meta, link, script, title");
>
> to filter out thes tags.
>
> I tried using this to filter img as well:
>
>   data = $(data).not("style, meta, link, script, title, img");
>
> and what  I noticed is that this doesn't work if the elements are
> within other elements.
>
> For example, I have this simple example:
>
>   <img src="1">
>   <div>
>      <img src="2">
>   </div>
>   <img src="3">
>
> In this case, only img 1 and 3 will be filtered out. img 2 will
> remain.
>
> I am wondering if that is proper behavior for .not(elements)?
>
> My goal is to filter all elements regardless of node or branch
> depth.
>
> Thanks
>
> --
> HLS
>
>

Reply via email to