Disabled Link In Bootstrap Pagination
I'm trying to use Bootstrap's Pagination style. The documentation says to create the page list like so:
Solution 2:
If you write the html dynamically server side (with django for example) and you don't want to use javascript you could do this:
pseudo code:
if (Model.HasNext()) {
<li> // normal link
<ahref="www.someurl.com/page=i">next</a></li>
} else {
<liclass="disabled"> // disabled link
<ahref="javascript: void(0)">next</a></li>
}
Solution 3:
As a reference, here is what Bootstrap does:
&.disabled,
&[disabled] {
cursor: not-allowed;
pointer-events: none; // Future-proof disabling of clicks.opacity(.65);
.box-shadow(none);
}
Solution 4:
$('.disabled a').click(function(){
returnfalse;
});
Solution 5:
For PHPLD v 4.2 I used the following code to show Bootstrap 3 pagination
{* Display Paging Links *}
<ul class="pagination">
<li>{paginate_prev id="MainPaging"}</li>
{paginate_middle id="MainPaging" format="page" prefix="" suffix="" link_prefix="
<li>"link_suffix="</li>" current_page_prefix="
<li class=\"active\"><a href=\"#\">"current_page_suffix="</a></li>"}
<li>{paginate_next id="MainPaging"}</li>
</ul>
Post a Comment for "Disabled Link In Bootstrap Pagination"