I'm trying to use Bootstrap's Pagination style. The documentation says to create the page list like so:
<div class="pagination">
<ul>
<li class="disabled"><a href="#">«</a></li>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">»</a></li>
</ul>
</div>
The first two links, the left arrow and the 1, should be disabled. When I incorporate it into my django template though, those two are still usable. Clicking them sends the user to the top of the page just like any other anchor link with an id "#". I think I still have to have the there in order for Bootstrap to style it correctly.
Is there a way to write this so that when the user clicks one of the disabled "buttons" it doesn't do anything?
For PHPLD v 4.2 I used the following code to show Bootstrap 3 pagination
As a reference, here is what Bootstrap does:
If you write the html dynamically server side (with django for example) and you don't want to use javascript you could do this:
In the docs, those buttons are just disabled manually. It has nothing to do with the
.pagination
styling.You could use that
Note: If you use an ajax based pagination you have to put this piece of code in the update handler or use delegated events instead