views:

259

answers:

9

hello, I'm very confused .. I have just finished studying Javascript , and when I wanted to learn more practical uses of js like making a sliding menu or drag and drop actions on online tutorial sites like nettuts, or pixel2life, I find very complicated examples that are not suitable for my level. They treat me as a pro, they use in their tutorials, for example, jQuery plugins, and explain how to use that plugin not how it's coded! Does anybody have any resource for explaining simple (although ,it is perhaps advanced in JS, like drag-drop) techniques! By simple I mean doesn't use plugins or libraries or 300 lines long! Or has anybody been in this situation? How did u overcome it, if yes? Thanks

edit: Thanks for all who replied , I really got new solutions with every single reply. That was , indeed , very helpful.

A: 

Google. There are thousands of tutorials out there and the majority of them are readable. (About 5x - 10x more explanation than code in many cases)

The only other things that can be done is to read the code that other people have written. However, this will be much harder than the tutorials I have found. It can be made easier by using a javascript debugger. I believe there is one included in the FireBug firefox extension.

Yacoby
-1, how is this in any way helpful? As you can see, he came from google.
slypete
I have found that Google is in many cases a better place to look for basic tutorials. I was also thought that while I would just look at the source, it is very hard work when you are inexperienced and may not understand the basic idea behind the script while the tutorials I found on google walked me though every step.
Yacoby
Instead of Google, how about something more targeted and social - for example, going to del.icio.us or StumbleUpon to find tutorials that many people have found useful?
David
+1 this is the best answer here so far.
Kinopiko
+3  A: 

There are tons of good links and resources for JavaScript at

https://developer.mozilla.org/En/JavaScript

There are also some good tutorials at Elated JavaScript Tutorials

RC
+1 for mentioning MDC. I think it's the best JavaScript reference out there.
Steve Harrison
+1 for NOT mentioning disastrous w3schools.com.
kangax
+3  A: 

Quite honestly - and I hope readers don't perceive this as dismissive - I think the best way to learn intermediate JavaScript is to view real-world examples on existing web pages and experiment on your own.

Go into this knowing that you'll find a mix of good and bad code. Try to learn the basics well enough that you can distinguish between those extremes, and understand when certain trade-offs (say, between clarity and performance) make sense.

Firefox 3.5 makes this style of learning really easy - when you "View source", all of the JavaScript files are hyperlinked, so you can easily open those files.

David
99% of code on the web is disastrously horrible, of course. Crockford has some notes on style it's worth reading... I often don't agree with him, but it helps to think critically about JS style.
bobince
A: 

I am in a web programming course and we use the "JavaScript Bible" by Danny Goodman. I have found it to be quite readable and it contains plenty of real world examples. It also comes with an ebook with tons of extra chapters which is really nice as far as searching for text goes. If you are looking for a quality javascript book, "JavaScript Bible" is definitely a great one.

Nate
Last time I checked, that book was not of the very good quality.
kangax
A: 

I think this is a wonderful online tutorial to get you into advanced JavaScrtipt: John Resig's Learning Advanced JavaScript

You might also want to check out Pro JavaScript Design Patterns by Apress.

Palo Verde
The questioner asked for intermediate JavaScript though. The tutorial you pointed to by John Resig looks very interesting but the contents are not what the questioner describes.
Kinopiko
@Kinopiko It's true that its labeled an 'advanced' resources. But really the first few sections of John Resig's is very basic, and eases into a more in-depth understanding of the language itself.
Palo Verde
A: 

Look at jQuery. Don't use it, look at it, how it is coded. It's all Javascript ;) And then just set yourself a goal and try to achieve it. It's always best to actually do something.

tharkun
I'm not really a fan of jQuery's code. I find a lot of it over-terse (even before minification ;-)) with long complex expressions with obscure side-effects packed into single long statements, wrapped uncomfortably. There is also some very questionable use of regexp, and the use of short (and duplicated) ambiguous names as gettersetters makes it difficult to follow IMO.
bobince
I just think, since he's going to use jQuery anyways it wouldn't harm knowing the source a bit.
tharkun
A: 

I wanted to be able to do nice interface effects with javascript, but didn't care much to really learn it. I was attracted to the mootools framework, so I started learning it.

I know, you said you didn't want to use a library, but this is how I--in your words--'overcame it.'

One day I realized I was so familiar with mootools code, that I was familiar with "vanilla javascript" code as well. And that makes sense, mootools is javascript. At that point it just became a matter of looking at the "vanilla" functions and tinkering with it.

That said, I still use mootools on pretty much every project because I don't see the value in abandoning it (for me, anyway.)

rpflo
A: 

I don't know if it is intermediate, but Javascript Ninja, http://jsninja.com/, is a fantastic book. John Resig teaches many of what ended up in jQuery, so, through this book you learn various techniques to be able to do the features you want to do.

Otherwise you may want to read some javascript cookbook, but that is basically just copy and paste, you won't learn how to develop these ideas on your own.

Your best bet is to just try to do something that interests you, then, when you get stuck, show what you have done, and ask SO for help.

But, read a book, such as what I mentioned, to understand closures and how selectors should work, and various aspects of using event handlers, as these will be important in doing interesting features in javascript.

James Black
+2  A: 

I am surprised that no one has yet mentioned Javascript: The Good Parts. Really good if you are not a beginner.

Alec Smart
Really good if you are new to Javascript, but not programming.
Steve Rowe