On Aug 19, 5:55 am, Kyle <[EMAIL PROTECTED]> wrote:
> $(this).hide().parent().prepend("<img class='ajax-loader' src='ajax-
> loader.gif' height='14px' style='padding-left:7px;' alt='loading...'/
>
> >");
>
> This, obviously, is in the head tag. However, when I run it through
> the validator, it is returning an error:
...
> I want to avoid invalid markup; how can I get around this?

In what context are you using $(this)? If $(this) resolves to the HEAD
then parent() will resolve (i believe) to the HTML node, to which you
are prepending an IMG, which of course is illegal. The way to avoid
that is to use a legal path to the element which you want to add the
IMG to.

Without seeing your code i can't say much more than that.

:?

Reply via email to