keeping in tradition of answering my own questions, I came up with this solution but I don't like it much because it's more code. I use jquery because its supposed to be less code :)
$('.toggler').click(function(){ $(this).toggleClass('open'); $(this).attr('class')=='expander' ? $(this).attr('class','open') : $ (this).attr('class','expander'); } So the question still stands: any ideas on how to get this effect going more elegantly?