Browse Source

Add `title` attribute to pagination controls defining the page number the control option will take you to

Jonathan Goode 10 years ago
parent
commit
5d54f8ca1f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/bootstrap-table.js

+ 6 - 0
src/bootstrap-table.js

@@ -1287,10 +1287,16 @@
             if (this.options.pageNumber <= 1) {
                 $first.addClass('disabled');
                 $pre.addClass('disabled');
+            } else {
+                $first.attr('title', 1);
+                $pre.attr('title', (this.options.pageNumber - 1));
             }
             if (this.options.pageNumber >= this.totalPages) {
                 $next.addClass('disabled');
                 $last.addClass('disabled');
+            } else {
+                $next.attr('title', (this.options.pageNumber + 1));
+                $last.attr('title', this.totalPages);
             }
             if (this.options.smartDisplay) {
                 if (this.totalPages <= 1) {