I suck at writing JavaScript and jQuery and I need to change that. Most of my career was Windows forms development and I kind of fell into web development. Now I am playing catch-up and trying to learn as I go. That means that I am writing alot of bad cut and paste code. Here are a few webpages and code snippits that I found that were written well and I can use for reference.
Here is some proper jQuery that does a series of actions on a single item. It came from here:
$('.nav a').click(function(e) {
var anchor = $(this);
anchor
.hide()
.css('color', 'red')
.show();
alert('something else');
anchor.hide();
e.preventDefault();
});
Jeremy McPeak wrote an interesting article on the nesting of JavaScript functions that got me thinking about how little I actually know about JavaScript. Now I am off to look at JavaScript: The Good Parts by Douglas Crockford that I heard about on HanselMinutes a while back.