jQuery Plugin Template

Replace instances of “yourPluginName” with your actual plugin name. The stuff about “radius” is just an example of an option (parameter to pass plugin).

(function($){
    $.yourPluginName = function(el, radius, options){
        // To avoid scope issues, use 'base' instead of 'this'
        
Avatar of Chris Coyier
Chris Coyier on

jQuery CSS Abstraction

It should be said, first and foremost, that you should try to keep your styling and your JavaScript away from each other. If you want to change the style of an element with JavaScript, add (or remove) a class name …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Reset Admin Password in Database

Forget your admin password and don’t have access to the email account it’s under? If you can get access to phpMyAdmin (or anything you can run mySQL commands), you can update it there.

UPDATE `wp_users` SET `user_pass` = MD5( 'new_password_here' 
Avatar of Chris Coyier
Chris Coyier on

CSS Secret Message Generator

I know ya’ll were just thinking to yourselves: man, I hope Chris posts some super nerdy article today with some nearly-useless technique that if I talked about in public would clinch the fact that I’m not getting laid anytime soon. …

Avatar of Chris Coyier
Chris Coyier on

Force Correct content-type for XHTML Documents

Most webservers serve XHTML content as text/html what is definitly the right way to handle XHTML documents. In case the server isn’t doing that correctly, you can force it on Apache servers with .htaccess:

RewriteEngine On
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond 
Avatar of Chris Coyier
Chris Coyier on

iPad Orientation CSS

<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css">
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css"> 
Avatar of Chris Coyier
Chris Coyier on

Slot Machine Tabs

I was looking at the features page of a web service called Fluxiom. I haven’t used the product (although it looks pretty nice and might be good few a couple of our clients). It’s the tabs on that page that …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

The Abstraction Point

Reader Joe Bob sent me a link to IxEdit to ask what I thought. I hadn’t heard of it, so I checked it out. They have a six minute video you can watch which explains it pretty well. In a …

Avatar of Chris Coyier
Chris Coyier on

#83: Thoughts on SEO

Fair warning: more rambling than usual. Listen to my thoughts about SEO. What I think I know is that SEO is a series of fairly obvious best practices. A SEO service that helps you with those things can be good, …

Avatar of Chris Coyier
Chris Coyier on (Updated on )