Closed (fixed)
Project:
Bootstrap
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2014 at 08:29 UTC
Updated:
16 Oct 2014 at 08:54 UTC
Jump to comment: Most recent
Correct me if I'm wrong, but I think around line 132 in botstrap.js there is a bug:
...
bootstrapAnchor: function (element) {
element.validAnchor = element.nodeName === 'A' && (location.hostname === element.hostname || !element.hostname) && element.hash.replace(/#/,'').length;
element.scrollTo = function(event) {
var attr = 'id';
var $target = $(element.hash);
if (!$target.length) {
attr = 'name';
$target = $('[name="' + element.hash.replace('#', '') + '"');
}
...
The selector for $target does not have closing square bracket.
Comments
Comment #1
psha commentedComment #2
psha commentedComment #3
markhalliwell