@wesbos this seems a bit upsdie down ;-) Can't we just do if (pages > 1) { $('ul.pagination').removeClass('one-page'); }