Hey Cherry, I like the new page layout! I have one comment about your
Methods: $().append section that I thought might be confusing to
people. It's just a technicality.

You write, "I wanted to replace my h1 heading with an image". But,
using .append() does not literally replace your h1 heading text,
rather, it adds on (yes, appends!) to anything contained in your h1
tag. Using the .append() code in your example, you end up with:

<h1> <ins><noscript>Header Text</noscript></ins><img ..... /></h1>
.. which works fine, but as you can see technically your header text
isn't replaced. It's been appended onto.

Another more straightforward way to accomplish what you're after is
this HTML:
<h1>Header Text</h1>
.. and this Javascript:
$('h1').html('<img ..... />');

.. This way your "Header Text" is replaced by the image. The .html()
method replaces anything inside the selected tags. This way is
validation-friendly and degrades gracefully if someone has Javascript
disabled. For more information on other similar DOM manipulation
methods, see this link - there's a bunch:
http://docs.jquery.com/Manipulation

-Wick
CarComplaints.com



On Feb 9, 9:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> About a week ago, I volunteered to blog my efforts at learning jQuery
> - I seem to be finding it more troublesome than most beginners! Some
> of you were encouraging (thank you VERY much!) but you all said it
> made a confusing read.
>
> Well, to an extent I can't fix that because the author *is* confused!
> However, I've done a whole new page for it, with nested topics & all.
> I hope it's easier to follow??
>
> http://jquery.cherryaustin.com
>
> There is a comments box and I'll add proper contact facilities if
> anybody reads it ;)
>
> Cheers, and thanks as ever for all your help :)
> Cherry.

On Feb 9, 9:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> About a week ago, I volunteered to blog my efforts at learning jQuery
> - I seem to be finding it more troublesome than most beginners! Some
> of you were encouraging (thank you VERY much!) but you all said it
> made a confusing read.
>
> Well, to an extent I can't fix that because the author *is* confused!
> However, I've done a whole new page for it, with nested topics & all.
> I hope it's easier to follow??
>
> http://jquery.cherryaustin.com
>
> There is a comments box and I'll add proper contact facilities if
> anybody reads it ;)
>
> Cheers, and thanks as ever for all your help :)
> Cherry.

Reply via email to