#81: AJAXing a WordPress Theme

Watch me bumble my way through adding AJAX functionality to a WordPress theme. The idea is that any internal link on the site will load into the main content area without requiring a page refresh, including search. Not always the …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Mailto Links

Basic

Open default mail program, create new message with the TO field already filled out.

<a href="mailto:[email protected]"Email Us</a

Adding a subject

Open default mail program, create new message with the TO and SUBJECT field already filled out. Essentially we …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Validate Age

This snippet presupposed an HTML form with and ID of “age-form” and three inputs (text or select) with the IDs “day”, “month”, and “year” respectively.

$("#age-form").submit(function(){
	var day = $("#day").val();
	var month = $("#month").val();
	var year = $("#year").val();
	var age 
Avatar of Chris Coyier
Chris Coyier on

Multiple Login Forms with Highlighting

This is a little specific… but I figured what the heck maybe it will be useful for someone. I recently had occasion to make multiple different login forms on a single page. With CSS we know we can apply styling …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Multiple Class / ID and Class Selectors

Can you spot the difference between these two selectors?

#header.callout {  }

#header .callout { }

They look nearly identical, but the top one has no space between #header and .callout while the bottom one does. This small difference makes …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Shortcode in a Template

Shortcodes in WordPress are bits of text you can use in the content area to invoke some kind of function to accomplish certain tasks. For example, video embedding in WP 2.9+ uses the shortcode. You can write your own shortcodes, …

Avatar of Chris Coyier
Chris Coyier on

CSS Off Update

Wave that checkered flag! Comments are closed and the entry form is shut down as the deadline for the CSS Off has now passed. We had an incredible 136 entries! A few right at the buzzer which makes me worry …

Avatar of Chris Coyier
Chris Coyier on