Posts tagged good code style

Fixing Common jQuery Animation Mistakes

0

I’ve seen people making the same mistake again and again when I’ve been helping on the jQuery IRC channel, and so I wanted to take the opportunity to write about it a bit to hopefully help clarify what the right way to handle the situation is. Basically, the trap people get themselves into is they want to fade in or out an element on the page, and then apply a CSS class to it. There is a right and a wrong way to do this.

(more…)

You’re not from around here, are you? – The Same Origin Policy

1

Recently, I’ve been seeing a lot of posts on things like StackOverflow, #jquery IRC, and other places asking about doing things like manipulating iframes. And in each and every case, the petitioning (though rarely aspiring) coder gets an answer about how to get, set, add, or remove some aspect of the iframe document object. And, inevitably, they come back and say that it doesn’t work. Now, at this point, there can be only one of two possible reasons for that.

(more…)

Great Wisdom

0

The koan below is liberally borrowed, but I most recently found it on an excellent article by Nick Morgan. If you are learning about closures in any language, both his article and the koan are excellent resources.

(more…)

Go to Top