Pro JavaScript Techniques

Category: Programming
Author: John Resig
All Stack Overflow 9
This Month Stack Overflow 2


by anonymous   2019-07-21

Designing With Web Standards by Jeffrey Zeldman is a very good introduction into front-end best practise. I would have to say John Resig's Pro JavaScript Techniques is the best JavaScript book I've read. As for CSS, the above mentioned Bulletproof Web Design and Pro CSS Techniques (from the same publisher as Pro JavaScript Techniques) are excellent.

by anonymous   2019-07-21

I actually think Resig's book, Pro Javascript Techniques would be a great fit. I read it a while ago and my memory of it was that he walked through a lot of the kinds of cross browser issues one can experience with Javascript and talks about how one could create code to help remediate those issues.

Ultimately that thinking is what jQuery is all about, but this book is not a jQuery book at all, more focused on JavaScript, approaching the same kinds of problems jQuery makes you not have to think about.

Might be a great fit for where you are, and it is by no means a beginner book.

by anonymous   2017-08-20

Sprenna, as you have mentioned you also have the option of using jQuery. If you want some kind of an in-depth read, then have a look at these three free jQuery books.

If you want a shorter introduction, have a look at this list of jQuery tutorials.

However, in short, using jQuery you can use this code to show/hide an HTML element:

// or

# is an ID selector. So #foo selects an element that its ID is is foo.

Then you can use the jQuery offset function to position elements relative to the document.

Finally you can use jQuery width and height functions to set the size of your desired element(s).

I also recommend you to read Pro JavaScript Techniques by the creator of jQuery. It improves your JavaScript knowledge and skills significantly.

by anonymous   2017-08-20

That's right, in javascript, almost everything is an object. But these objects are bit different from what we see in Java, C++ or other conventional languages. An object in JS is simply a hashmap with key-value pairs. A key is always a string, and a value can be anything including strings, integers, booleans, functions, other objects etc. So I can create a new object like this:

var obj = {}; // this is not the only way to create an object in JS

and add new key-value pairs into it:

obj['message'] = 'Hello'; // you can always attach new properties to an object externally


obj.message = 'Hello';

Similarly, if I want to add a new function to this object:

obj['showMessage'] = function(){


obj.showMessage = function() {

Now, whenever I call this function, it will show a pop-up with message:


Arrays are simply those objects which are capable of containing lists of values:

var arr = [32, 33, 34, 35]; // one way of creating arrays in JS

Although you can always use any object to store values, but arrays allow you to store them without associating a key with each of them. So you can access an item using it's index:

alert(arr[1]); // this would show 33

An array object, just like any other object in JS, has it's properties, such as:

alert(arr.length); // this would show 4

For in-depth detail, I would highly recommend John Resig's Pro Javascript Techniques.

by anonymous   2017-08-20

My recommended reading list



I also recommend JSBin for testing and trying out ideas

The following sites are also useful


  • Mozilla JavaScript Reference

  • Dean Edward's blog

  • Remy Sharp's b:log

  • Ajaxian


  • jQuery documentation

  • jQuery for designers

  • Learning jQuery

  • Brandon Aaron's blog