IE Background RGB Bug

Using RGBa for progressive enhancement is getting more and more popular, which is awesome. Even nearly a year ago it was pretty much ready to rock. A great way to handle the progressive enhancement part is just to declare …

Avatar of Chris Coyier
Chris Coyier on

Fire Event When User is Idle

See the two commented lines below, that is where you can insert code for things to do when the user goes idle, and when the user comes back. Set the idle period on the third line, 1000 = 1 second. …

Avatar of Chris Coyier
Chris Coyier on

Current Page with JavaScript

This is like a replacement for PHP’s SCRIPT_NAME with JavaScript.

location.href.split('/').pop();

For example with this URL:
https://css-tricks.com/examples/ScriptName/index.php

This code:

document.write( location.href.split('/').pop() );

Would write to the page: “index.php”…

Avatar of Chris Coyier
Chris Coyier on

#79: Complete/Non-Queuing Animations with jQuery

When you use jQuery’s .animate() function with something like a hover event, those animations will “queue up”. That is, if you hover multiple times, that animation will fire multiple times. The classic method to prevent this is to throw in …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

New Poll: Tag/Punctuation Placement

There is probably a right and wrong answer for this, so if that emerges, I’ll update this article and mention it in the results. Regardless, I don’t think it’s obvious, so this poll should be answered on what you currently …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Append Login Credentials to URL

The example here is if you had a form on a website that when submitted, needed to use that information to go to a special URL where the login information was all appeneded to the URL. You could have the …

Avatar of Chris Coyier
Chris Coyier on

How To Create an IE-Only Stylesheet

This article has been updated from an older version (originally Sept 24, 2007). I just wanted to expand it and make it more clear.

If you read this blog, there is a 99% chance you’ve had a hair-pulling experience with …

Avatar of Chris Coyier
Chris Coyier on (Updated on )