Web developer

Displaying posts tagged:

Different var, same subject

1 Comment

I recently tried to do something and I don't know if it is all that good. If somebody has an opinion about it, I would love to hear it.
I have been using the $ suffix for variables that are really jQuery objects. But I keep coming across occurrences that need the real variable, aka not the…

JavaScript disabled?

No Comments

I just came across a small article by Nicholas C. Zakas (@slicknet), who I saw give a great presentation at last fronteers conference by the way, in which he states:

which one is faster?


People, is there anybody who can help me. I am wondering which one is faster...
Calling this several times in a script:
var foo = $(data).find('foo').text();
var bar = $(data).find('bar').text();
Or wrapping it in a function:
var findData = function (data, field) {
var v = $(data).find( field ).text();
return v;
And calling that as many times:
var foo …

Javascript coding suggestions


I am now working on some coding conventions for use at one of my clients. Having done some work on the HTML and CSS ones, I recently started with the javascript one. As I was working on it, I looked at the work done by others, like Douglas Crockford. Some of my co-workers suggested that we …

JQuery coding style


I was just documenting a whole bunch of scripts and I noticed that my coding style is not so consistent as I like to think. It seems like I am a real person too :). But this put a question in my head, what do most people do if you chain lots of things. All on …