$(document).ready(function(){
$("legend").click(function(event){
if ( $(this).parent().children('div').is('.hidden') ) {
$(this).parent().children('div').removeClass('hidden') ;
}
else {
$(this).parent().children('div').addClass('hidden') ;
}
});
});
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