Sponsored by Travelzoo
$52 and Up—Airlines Slash Fares On Peak Holiday Flights. view!
travelzoo.com - This year, waiting until the last minute is NOT the best strategy. See why.
31 Comments
- kc999, on 10/12/2007, -0/+4Why not just use the Prototype library? Most of these are already in there. http://prototype.conio.net/
- polvero, on 10/12/2007, -0/+2Not until you're digged do you realize everyone's talking about you. Thanks all for the wonderful comments. I knew some would have tiffs with the functions and others would surely enjoy them!
The reason for not having any ajax functions is because I don't believe there is yet a function worthy enough of being one of the best. Ajax is still in its infancy so developers (IMO) are still working out what's best.
The reasons for no Browser detection functions or not having getElementById() syntax is because that's up to the developer to implement themselves. These functions were not the place for them.
Whoever commented "MM_preloadImages" ...hehe. That's awesome! I should have added that in just for humor kicks ;)
Lastly, the article is not BS. Just because two functions reference something I wrote doesn't mean its crap. Did you even look at them? The point was to reference an 'idea of a function' and "here's one version of it". No need for the harsh words ;) - jaredvolkl, on 10/12/2007, -0/+2Helped me learn some more JS. Dugg!
- iTorrey, on 10/12/2007, -0/+2My common.js is dojo.js :)
- RadicalBender, on 10/12/2007, -0/+1Not included: MM_preloadImages
I think that's used quite a bit more. It *does* return a lot of Google results. :)
(Yes, I'm kidding.) - polvero, on 10/12/2007, -0/+1Is there a problem with Develosphere. Sheesh. Get an imagination :) I has having fun with it.
- kevmaster, on 05/28/2009, -0/+1Be sure to checkout 400+ PHP functions ported to JavaScript
http://phpjs.org/functions/index - gambl0r, on 10/12/2007, -0/+0That $() function kicks ass. I'll definitely be using that one in the future. The rest I've seen in one form or another.
- motionblur, on 10/12/2007, -1/+1Very nice web design on that site.
- gambl0r, on 10/12/2007, -0/+0Also, the original article says nothing about them being the most used, that was added by the person who digged it. These might not be the most used, but they are useful.
- trogdoor, on 10/12/2007, -0/+0Really though (I am not big on javascript so correct me if I am wrong) the $() function allows you to pass an arbitrary number of arguments without useing an array and also allows those arguments to be of any type. I am even less sure about this but it may also allow you to return an arbitrary type.
- trogdoor, on 10/12/2007, -0/+0^^ it does everything^^
- bmw@, on 10/12/2007, -0/+0Develosphere is one of the best new words I've learned in the Diggosphere so far.
- estacado, on 10/12/2007, -0/+0What does $() actually do? Display the dollar sign? I don't get it.
- Otto, on 10/12/2007, -1/+1He used the word "develosphere" and meant it. No digg just for that.
- EyePulp, on 10/12/2007, -0/+0Nice list and a nice site. The $() function is quite interesting.
diggity++ - kindafun, on 10/12/2007, -0/+0If you like that $ function, have a look at the extended remix:
http://digg.com/programming/A_better_dollar_function_-_getElementsByAnything
:) - swillison, on 10/12/2007, -0/+0"These scripts also lack any sort of compatibility for older browsers. They all rely on the getElementByID syntax, which is not supported by older browsers."
Rubbish. Every browser since Netscape 4 and IE 4 supports getElementById. If you want to write scripts in those browsers you'll find very little else works either. There's no reason at all to avoid relying on getElementById (unless your users really do live in the stone age). - psylence, on 10/12/2007, -0/+0The $() seems to take a varargs list of id's or objects, if it's an object it just doesn't touch it, if it's an id it grabs the element, and mashes them together and returns them all. (Congratulations, I know, I read the code! OMG!)
I particularly like the if(arguments.length == 1) in the middle of a for loop iterating over the arguments array, well made... :/
I don't really see how this is amazing. Are basic utility functions really that amazing to web developers? - rboothby, on 10/12/2007, -0/+0Great list for a newbie, like me. Thank you.
How you use some of the functions, well most of the functions, is not clear to me. If you wrapped that list into a tutorial, you would have created something truly amazingly useful.
Regardless - thank you for the post. - stokestack, on 10/12/2007, -0/+0What this list proves is that the DOM sucks.
- gregcotten, on 10/12/2007, -0/+0umm... Those are methods - or are Javascript and Java two different things?
- HeroreV, on 10/12/2007, -0/+0quote: "Are basic utility functions really that amazing to web developers?"
You obviously don't understand just how bad most web developers are at coding. If they would program a little in C++/Java/Python/etc for a while they might not be so amazed at such simple things, but obviously, they don't.
If you open up a JavaScript Console in a web browser and surf around a while you'll see hundreds of errors popping up constantly. Pathetic. - psylence, on 10/12/2007, -0/+0Wow... Just... Wow...
- inactive, on 10/12/2007, -0/+0"it may sound fartastic, but it actually stinks"
cool - yogastore, on 06/27/2008, -0/+0http://astore.amazon.com/baby.dry.diapers-20
http://astore.amazon.com/huggies.baby.diapers-20
http://astore.amazon.com/nike.heart.rate.monitor.w ...
http://astore.amazon.com/polar.heart.rate.monitor. ...
http://astore.amazon.com/digital.bathroom.scale-20
http://astore.amazon.com/digital.food.scale-20
http://astore.amazon.com/kitchen.trash.can-20
http://astore.amazon.com/outdoor.trash.can-20
http://astore.amazon.com/digital.pedometer-20
http://astore.amazon.com/omron.digital.pedometer-2 ... - Shen, on 10/12/2007, -0/+0The dollar function looks awesome. Very nice!
- angloafro, on 10/12/2007, -1/+0eh, decent, but not the top 10 of all time. Especially considering it doesn't include any form/work flow abstraction or anything dealing with the nuances of ajax... I mean I use validation functions more than any of these functions many of which are much more complex.
- BlueLaser, on 10/12/2007, -1/+0These scripts also lack any sort of compatibility for older browsers. They all rely on the getElementByID syntax, which is not supported by older browsers. To be complete, it needs a generic getElement function, similar to what's available in the XLib javascript library...
- woohoowoot1, on 10/12/2007, -5/+0pretty reliable
http://www.freexbox360.ca/?r=10318 - woohoowoot1, on 10/12/2007, -5/+0dig++ woot
http://www.freexbox360.ca/?r=10318


What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the