Learning/Mastering jQuery

These days most of my projects are done in .Net with MVC.  In order to get the pages to work properly I need to write a lot of javascript and jQuery.  I decided to take a course from  Benchmark Learning to help me improve my skills with it.  Here is a list of the resources I am using to improve my skills.

Benchmark course: Mastering jQuery

Official jQuery website

Html reference at W3Schools

Tutorials from the jQuery website

Free online fundamentals book by Rebecca Murphey

Hottest questions about jQuery on StackOverflow

John Resign video

CSS Selectors

In CSS, selectors are patterns used to select the element(s) you want to style.
The “CSS” column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3).

Selector Example Example description CSS
.class .intro Selects all elements with 1
#id #firstname Selects the element with id=”firstname” 1
* * Selects all elements 2
element p Selects all

elements

1
element,element div,p Selects all

elements and all

elements

1
element element div p Selects all

elements inside

elements
1

JavaScript/jQuery Notes

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.

Fonts and Bill Hill

Today started with listening to a podcast on Typography from “This Developers Life”.  It was fantastic and not at all what I expected.  I ended up with an interesting lesson on who Bill Hill is.  I spent some time exploring his website and blog and was pleasantly surprised by what I learned.  It inspired me to spend a bit of time focusing on a personal website that I have had floating around in my head for a while.  I decided I wanted to play around with fonts and found Google Web Fonts which gives me a simple place to start.  Hopefully I can find some more time to focus on my site and eventually some day I will get it up and running.

PRG (Post, Redirect, Get) Pattern

What is the PRG Pattern?

While the PRG pattern isn’t new, there isn’t much out there on it for the .NET community. PRG stands for “Post/Redirect/Get”, I’ll let Wikipedia explain the rest:

instead of returning an HTML page directly, the POST operation returns a redirection command (using the HTTP 303 response code (sometimes 302) together with the HTTP “Location” response header), instructing the browser to load a different page using an HTTP GET request. The result page can then safely be bookmarked or reloaded without unexpected side effects.

While this could be accomplished in webforms, it would be much more difficult since the postback model hangs on pages posting to themselves to implement button clicks and the like. The MVC Framework on the other hand makes the implementation of the PRG pattern extremely easy.
See rest of article written by devlicio.us ….