Detect http headers?

Detect http headers?

Can jQuery detect 404 http response headers and then display a hidden div? 

My case is: 

In htaccess I've set my homepage as the 404 error document. The page contains a hidden "Oops not found" text that I want to show in the case of a 404.