I’m trying to make it so the next and previous page links do not display with the will_paginate gem if there are no more pages they can link to.
will_paginate assigns a special class to the span “next_page disabled” rather than the simple next_page if there is nothing to link to.
I tried just not displaying it with CSS:
.next_page disabled {
display: none;
}
and tried with %20:
.next_page%20disabled {
Anyway, does anyone know of a simple with to disable these links if they don’t do anything?
Thanks
Try .next_page.disabled – or even just .disabled – that should work. You can specify multiple classes for a single element, and that’s what you’re seeing here.