Permalink
Browse files

Two more methods of finding the anchor

  • Loading branch information...
1 parent 5e85b9f commit a3ef01d4b2b26d7125262301247fadb538fcdea7 @Mathnerd314 committed Mar 14, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 bootstrap.js
View
@@ -378,6 +378,17 @@ Repaginator.prototype = {
}
}
+ if (focusElement.id) {
@nmaier

nmaier Mar 16, 2012

Seems reasonable.
I'll test this later...

+ this.query += "//a[@id='" + focusElement.id + "']";
+ this.numberToken = /(\[@id='.*?)(\d+)(.*?'\])/;
+ return;
+ }
+
+ if (focusElement.className) {
@nmaier

nmaier Mar 16, 2012

I have doubts that className is precise enough

+ this.query += "//a[@class='" + focusElement.className + "']";
+ this.numberToken = /(\[@class='.*?)(\d+)(.*?'\])/;
+ return;
+ }
// Nothing else we might try
throw new Error("Repagination: no anchor expression found!");
}).call(this);

0 comments on commit a3ef01d

Please sign in to comment.