Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin breaks HTML internal links, just by loading it #9

Open
holtkamp opened this issue Oct 29, 2015 · 2 comments
Open

Plugin breaks HTML internal links, just by loading it #9

holtkamp opened this issue Oct 29, 2015 · 2 comments
Assignees

Comments

@holtkamp
Copy link

Currently the plugin applies the ListGroup 'selecting' behavior to all elements with class 'list-group' by default.

Effectively, it intercepts the clicks. This 'breaks' the following code-snipet that we used as a kind of "Table Of Contents":

<div class="list-group">
  <a class="list-group-item" href="#chapter-1-section-1">Go to Section 1.1</a>
  <a class="list-group-item" href="#chapter-1-section-2">Go to Section 1.2</a>
  <a class="list-group-item" href="#chapter-1-section-3">Go to Section 1.3</a>
  <a class="list-group-item" href="#chapter-1-section-4">Go to Section 1.4</a>
  <a class="list-group-item" href="#chapter-1-section-5">Go to Section 1.5</a>
</div>

Is there a way the internal link as used in the href attribute of the involved anchor is still respected => the browser scrolls to that section as it would do without the plugin loaded?

@rickardn rickardn self-assigned this Nov 4, 2015
@holtkamp
Copy link
Author

walking into this issue again, now for external hyperlinks. Maybe the class that listgroup.js uses to apply its functionality can be made configurable (defaulting to "list-group")? This would be the easiest and quite powerful approach I would say. My JavaScript is not great, otherwise I would come up with a PR...

@holtkamp
Copy link
Author

@rickardn bump?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants