Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2009/04/09

And the jQuery is just that simple!

  1. $(document).ready(function(){  
  2.      $("legend").click(function(event){  
  3.           if ( $(this).parent().children('div').is('.hidden') ) {  
  4.               $(this).parent().children('div').removeClass('hidden') ;  
  5.               }  
  6.           else {  
  7.               $(this).parent().children('div').addClass('hidden') ;  
  8.               }  
  9.           });  
  10.       });  


Except I think I will want an external link, so I'll have to add another level of parent(). But jQuery is hardly distinguishable from magic.

No comments:

Post a Comment