Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted at DevOpera

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By ChrisHeilmann anchor Wednesday, 19. December 2007, 13:14:18

The seven rules of unobtrusive JavaScript

Reproduced with permission from Christian's wait-till-i.com developer resource/blog site, this article provides a very useful set of tips for any experienced JavaScript developer wanting to improve their unobtrusive JavaScript skills. Now read on...!

( Read the article )

By d4n3 anchor Thursday, 20. December 2007, 12:39:58

avatarCool article...

I noticed this:
xxxx:function){

on a couple of code examples... Shouldn't this be:
xxxx:function(){

By chrismills anchor Thursday, 20. December 2007, 17:19:25

avatarYou are right. This is a parser bug - the missing brackets are there in the original article source code ;-(

I'll try to fix this.

By henryjames anchor Saturday, 29. December 2007, 13:55:51

avatarA very interesting and insightful article. I sincerely hope that it will be read by as many people as possible and that they will follow the guidelines presented in it. Being a programer myself I often have to work on code I received from my colleagues and too often I have problems in unedrstanging their work. Some people just tend to wirte in such an unclear manner and don't even bother to add comments in crucial or complex parts of the code.

By jonyellow anchor Sunday, 30. December 2007, 14:51:25

avatarWonderful tips, thank you so much! I often find myself in trouble because of scripts designed by someone else. I have to show this atricle to my colleagues from work, hopefuly they will benefit from reading it. Some time age other designers defining some variables as global were a real pain in the neck.

By vithar anchor Friday, 11. January 2008, 21:24:48

avatardocument.documentElement.id = "js" is more elegant than document.body.className. This adds id="js" to the "html" element and then #js can be used in CSS selector.

See http://harisov.livejournal.com/63790.html (in Russian).

By motorfest anchor Tuesday, 27. May 2008, 09:58:06

avatarI quite recently met with js. It was here found by me very much a lot of good advices is on js, html, and css.It very good article Thank you for your post!

By evilopera anchor Thursday, 29. May 2008, 12:17:58

avatarVery competent article + large base of interesting information. I think that these rules will help many people to correct the javascript code (especially to the novices). I already did for itself a code simpler, quick, and more beautiful. Thank you.

By AlexeyGfi anchor Saturday, 7. June 2008, 20:27:46

avatarAbout rule #1 : If i need to test something (like html, css OR! js-code), i run firebug for firefox, testing there and then use it in my source code. It is powerfull instrument, because all variables are loaded and i can use their anyhow. ))

Moderators: jax | malware | mcx | operadev