Learning JavaScript

Right now, I have a very limited knowledge of JavaScript. More to the point, I know a lot about what you shouldn’t do, but I don’t know enough about what you should do to actually get anything done. So today when I had an idea for something to do, my approach was “try stuff and see if it works”.

It didn’t. In fact, it nearly did, but I kept getting the one same error message over and over again. After a few hours I (think I) figured out the problem, but not how to fix it, and at that point I decided I should actually learn starting from the beginning, and maybe then I’d have a solid enough foundation to figure out my error.

So here is what I’m getting to: Why are there no good javascript tutorials anywhere on the web? I looked around and I can find nothing that seems to have been written by someone knowledgeable about Web Standards and the Right Way to do Things. My criteria? If a tutorial tells me to put the script element in the body, it gets closed immediately. If it starts me off with a “Hello World” using document.write, I get very skeptical, and close it in a few pages if it doesn’t redeem itself.

And no tutorial so far has passed even those two tests. There are a few sites out there that I can tell are good—like the unobtrusive javascript page I linked to before, but those aren’t basic enough for me. I’ve tried taking things off those sites and adapting them to my needs, but failed. They’re just a bit to advanced for me.

So where are the good tutorials, that explain for a beginner the right way to do things?

P.S.: If you’re interested in helping me do this one thing, all it is is that I have a div with an original background-color of black, and I want to make it transparent when it’s hovered over with the mouse—and do it in a way that separates content, style, and behavior. And no, I can’t use :hover, because I want to do other things to it later.

11 Responses to “Learning JavaScript”

  1. Dante says:

    QuirksMode. THE javascript/DOM website, with great beginning tutorials.

  2. Anne says:

    The solution. I hope it is of some use.

  3. dolphinling says:

    Dante: I actually thought QuirksMode was one of the better ones I looked at, but things like

    <ul id="mouseovers">
    <li><a href="intro.html"><img src="pix/mo_home.gif" width="80"
    	height="50" border="0" /></a></li>
    <li><a href="placejs.html"><img src="pix/mo_place.gif" width="80"
    	height="50" border="0" /></a></li>

    made me look for another one. Maybe I’m just too much of a perfectionist, but I want someone who’s teaching me javascript to also be perfect, or at least try harder than that.

    Anne: Thank you! I now see where my mistake was. Hopefully I can now teach myself the rest of what I need :-)

  4. Mark Wubben says:

    JavaScript. The Definitive Guide v4 by David Flanagan. Definately.

    But I have to say here that I bought this book when I already knew quite a bit about JavaScript. I read it three years ago, and at the time I found it difficult to understand, but hey, I was 15 at the time so it might have been that ;-)

    P.S. I believe <i/> correctly marks up book titles, but it’s not allowed… (argh, I should’ve never written that plugin!)

  5. Masklinn says:

    I can only second Dante’s comment…
    Quirksmode is really the best website about javascript, DOM and DOM Events that I have ever found.

    The markup may be found lacking, but PPK knows about it, and what isn’t intended, done by design, he just doesn’t care about. Read this page for more

    It would truly be sad for you to miss Quirksmode’s ressources, because you more than likely won’t find any better and up to date one on the web…

  6. dolphinling says:

    Mark: I actually looked at that on amazon. Perhaps I can convince my library to buy it for me. (We really need to redo the computer books collection. We still have books on Word 6, and very little that’s new and good.)

    Masklinn: A very interesting page. I guess my viewpoint is different from his in that I’m less concerned with making things that work, and more concerned with understanding how things work and making new ways for things to work. So for now I think I’ll try to teach myself, but I’ll take your and Dante’s recommendation if I need help with anything.

    P.S. Mark: I don’t believe <i/> correctly marks up book titles, so thank your past self :-). If only I had some way of allowing per-comment styles, then you could do <span class="book-title">, .book-title{font-style:italic;}

  7. Dante says:

    Trust me, Dolphin. When I was learning JavaScript I visited QuirksMode every day. There’s just too much good stuff, and plenty of info on making things work. Even if the markup is a little outdated, his theories still apply.

  8. Chris says:

    You are spot-on with your request. Today we had a meeting after the @media conference including some of the best JavaScript minds out there: Peter-Paul Koch, Dean Edwards, Stuart Langridge and, well, me (I wrote the Unobtrusive JavaScript course).

    We have agreed to publish a lot more basic examples and maybe think about a pattern repository. It will take some time, but we are thinking about it.

    Personally, I am rewriting the course, and will extend it to more basic examples and some other broad vision statements. Give us some time :)

  9. Jeremy Keith says:

    As Chris said, a whole bunch of people gathered together in London to address the problem of the lack of resources on JavaScript. Expect to see lots of tutorials and articles over the coming months. For my part, I’m writing a book aimed at JavaScript novices.

    I think the resources situation will improve slowly but surely.

  10. Alessandro Fulciniti says:

    Check out http://www.brainjar.com , it has in my opinion one of the best tutorials on getting started with javascript and DOM.

  11. Max Design - standards based web design, development and training » Blog Archive » Some links for light reading (13/6/05) says:

    [...] Learning Javascript [...]