I came across this Stack Overflow question today about replacing radio buttons with images, however the answers there didn't sit quite right with me. They were completely reliant on javascript, which was fine according to the OP, but I feel that javascript enhancements like this, especially when they deal with things which require user input, [...]
jQuery 1.4 released
Despite the risk of joining in the echo chamber that I'm sure will start up very soon, I just wanted to write a little observation.
jQuery 1.4 has been released. Kinda.
It's a little baffling to me, considering the first release candidate was only announced one day ago, yet the dedicated jQuery 1.4 website proudly states "jQuery [...]
Common Mistakes Part 1: SJAX
Here's another common mistake I see on Stack Overflow from time to time. The basic pattern goes like this:
// get the contents from some remote file
$('#myElement').load('lipsum.html');
alert($('#myElement').html());
// wtf, it's still empty?!?
This is something that I struggled with when I started playing with AJAX techniques, too. It's quite understandable how so many people [...]
Common Mistakes Part 0: 83.333% of jQuery
I've decided to start writing a short series of posts highlighting some common mistakes I see in questions and, more importantly, answers on Stack Overflow. I enter this knowing fully well that I am but an amateur who is also learning new things daily. Anyway, the series kicks off with Part Zero, titled 83.333% of [...]
Avoiding conflicts in jQuery
A very useful jQuery tip which I've picked up, but also noticed that isn't widely known is to do with the common document.ready function. The old way to do it is like this:
$(document).ready(function() {
});
This method is preferred by some developers, because they see it as being more expressive: you are writing a function to be [...]
jQuery is not optimised how you’d think
I've come into the habit of altering my jQuery queries to hopefully optimise them to run faster. For example, if I wanted to get the html of the first "a" element...
// i'd use this:
$("a:first").html()
// instead of this, which is functionally identical
$("a").html()
It makes sense right? Don't bother getting all the elements, just stop at the first [...]
Recent Entries
- Image radio buttons
- Javascript default values
- Ubuntu, nooooo!
- The great rep recalc of 2010
- A suggestion for Ford
- jQuery 1.4 released
- Common Mistakes Part 1: SJAX
- Anyone have any questions?
- Common Mistakes Part 0: 83.333% of jQuery
- Regex for PHP function declarations
Recent Comments
- Damo in Image radio buttons
- alex in The great rep recalc of 2010
- Fisher in Anyone have any questions?
- fake in Anyone have any questions?
- alex in Anyone have any questions?
- Fisher in Common Mistakes Part 0: 83.333% of …
- alex in Common Mistakes Part 0: 83.333% of …
- Fisher in Perhaps the most epic Stack Overflo…
- alex in Perhaps the most epic Stack Overflo…
- alex in jQuery is not optimised how you'd t…
Categories
Archives
- June 2010
- May 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- January 2009
- December 2008
- September 2008
- July 2008
- June 2008
- April 2008
- March 2008
- December 2007
- November 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
Pages
Blogroll
- Chris Dot Spadgos
- Fisher Dot Spadgos
- Furious Steals - Highly destructive UT2004 racing mod
- Marshmallow Duel - The 1996 cult classic and delicious fan remakes
- NB Dot Spadgos
- Pospi Dot Spadgos