Here's my current if/else statement:
var current_class = $(this).closest("article").attr("class")
if (current_class == 'opened')
{
$(this).closest("article").removeClass('opened');
$(this).closest("article").addClass('closed');
}
else
{
$(this).closest("article").removeClass('closed');
$(this).closest("article").addClass('opened');
}
Is there a shorter way to write all of that? Just seems...overweight. :)