* http://sizzlejs.com/

JavaScript
var $test = jQuery( document );
Sizzle.selectors.pseudos.fixed = function( elem ) {
    $test[ 0 ] = elem;
    return $test.css( "position" ) === "fixed";
};
Source

Also in JavaScript: