function showSomething() { var a = $('.first-link-class'); a[a.hasClass('handle') ? 'removeClass' : 'addClass']('handle') }