On Sat, Feb 7, 2009 at 11:21 PM, Ricardo Tomasi <ricardob...@gmail.com> wrote:
>
>
> Alternatively you could add a different class to the body of each
> page, then use this rather amusing construct:
>
> $(document).ready((function(){
>  var is = function(v){ return ++document.body.className.indexOf(v) };
>
>  return(
>   is('categories')
>     ? ManageCategoriesClick :
>   is('hidebydefault')
>     ? HideByDefault :
>   is('form')
>     ? PrepareSplitForm :
>   is('advert')
>     ? SetUpAdvertPopup :
>   function(){} //nothing
>  );
>
> })());
>

That is, indeed, amusing. And one for my toy chest. Thanks!

Who knew, back in '96, that javascript was going to turn out to be so much fun?

Reply via email to