Web developer

Displaying posts tagged:

Linkbait 7-5-13

No Comments

With links about node.js, what kind of programming types are there, why you shouldn't use (or rely) on jQuery and more.

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…

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 …

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 …

Pagination script for jquery

No Comments

A small script I wrote to do pagination, sorting and zebra-striping of a list.
As you can see we start of with a ;, in case some sloppy programmer forgot to add it to the end of his function. Than as a first, we set our namespace as the first thing to do as we don't want…