New answer
(1) You can add the target to your link:
<a href="products.php#my-catalogue" data-target="#my-catalogue">my catalogue</a>
(2) Bootstrap uses your href or data-target in your navigation links to find the target regions on the page. If you have something like products.php#my-catalogue , checking the correct expression in the code will fail. But if you crop in advance, it will work
In the spyware bootstrap scroll code, you can change (in the Refresh function in ScrollSpy):
.map(function () { var $el = $(this) , href = $el.data('target') || $el.attr('href') , $href = /^#\w/.test(href) && $(href)
to
.map(function () { var $el = $(this) , href = $el.data('target') || $el.attr('href') , trimmed = href.match(/#\w*/)[0] , $href = /^#\w/.test(trimmed) && $(trimmed)
and then having something like
<a href="products.php#my-catalogue">my catalogue</a>
no problem
Old answer
Perhaps you could try editing the scroll scroll selector in jst bootstrap code?
There is a line (about 1442 for me):
selector = this.selector + '[data-target="' + target + '"],' + this.selector + '[href="' + target + '"]'
If changed to
selector = this.selector + '[data-target="' + target + '"],' + this.selector + '[href="products.php' + target + '"]'
Can solve your problem
hajpoj
source share