This is done using CSS and jQuery, quite simply. I created a jsFiddle example demonstrating how to do this:
$(document).ready(function(){ var $overlay = $('#overlay'); $('#search').click(function(){ if ( $overlay.is(':visible') ) { $overlay.fadeOut(); } else { $overlay.fadeIn(); } }); $('#close').click(function(){ $overlay.fadeOut(); }); });
Take a look here: http://jsfiddle.net/peduarte/VeRMW/
Key features: click , fadeIn and fadeOut .
source share