Latest release

4.0.0

@bryanbraun bryanbraun released this Jun 2, 2017 · 1 commit to master since this release

Breaking Changes:

  • Any Links or generated IDs containing a < or > character will have them removed. Those characters are not appropriate in IDs because they are part of the CSS language spec. See #81.
  • We removed h1 from the default selector applied when anchors.add() is called without arguments. Before: h1, h2, h3, h4, h5, h6. After: h2, h3, h4, h5, h6. See #75.

Features:

  • Added the ability to link to other IDs on the page (like those on wrapper or <section> elements). This means you can use AnchorJS for highlighted sections. See the docs, or the related issues: #83 and #87
  • Many documentation improvements and clarifications.

Bug Fixes:

  • Prevents a console error that would occur when running add() on a selector with no elements, followed by a chained method. See #79

Downloads

3.2.2

@bryanbraun bryanbraun released this Oct 6, 2016 · 23 commits to master since this release

Includes font optimizations from #70 for a smaller filesize.

Downloads

3.2.1

@bryanbraun bryanbraun released this Jul 18, 2016 · 28 commits to master since this release

Fixes #67 - A bug where bundling AnchorJS with other scripts could cause 'use script' declarations to apply to external code.

Downloads

3.2.0

@bryanbraun bryanbraun released this Jun 10, 2016 · 30 commits to master since this release

Fixes:

  • #59 - Add support for Node, AMD, & CommonJS (Via UMD)
  • When installing via bower, ignore package.json.

These changes improve compatibility & code inclusion, but should not affect functionality at all.

Downloads

3.1.1

@bryanbraun bryanbraun released this Apr 30, 2016 · 36 commits to master since this release

Fixes #56, a regression where errors are caused when attempting to add (or remove) anchors from empty html tags.

Downloads

3.1.0

@bryanbraun bryanbraun released this Feb 13, 2016 · 38 commits to master since this release

Updates include:

  • Resolves #50, by exposing the list of anchored elements at anchors.elements. External code can use this list to do things like building a table of contents or jump-nav.
  • Prevents multiple anchors from being added to the same element (and thus, duplicate elements from being in the elements list)
  • Allows anchors.add and anchors.remove to optionally take an array of elements or a nodeList instead of the selector-string only.
  • Adds anchors.removeAll().
  • Improves tests and updates dev-dependencies.

Downloads

3.0.0

@bryanbraun bryanbraun released this Jan 24, 2016 · 45 commits to master since this release

Removes the "trim" option, making a the trimming of URL strings part of the default process.
Also updates dev dependencies, organizes tests and makes them more granular.

Compatibility Notice:

If you are updating to 3.0.0, it's possible that a generated URL may change if text that AnchorJS uses to generate the ID had special whitespace characters before or after it. These characters (like newlines and carriage returns) are now being trimmed. Simple spaces were being trimmed before, and thus should not be affected.

Downloads

2.1.0

@bryanbraun bryanbraun released this Jan 23, 2016 · 50 commits to master since this release

Adds the following features:

  • A new option anchors.options.visible= "touch". This option makes anchors visible via hover on non-touch devices, but always visible on touch devices. See #47.
  • A new option anchors.options.trim = true for trimming whitespace around targeted html text before converting the text into url-friendly IDs. See #43.

Downloads

2.0.0

@bryanbraun bryanbraun released this Nov 7, 2015 · 57 commits to master since this release

Features:

Other Improvements:

  • Added several more tests around transforming text into URL-friendly IDs.
  • Added JSDoc-formatted comments throughout the code.
  • Tighten up the API - use private functions within closures for internal AnchorJS code.
  • Updated Dev Dependencies.

Notes:
This is a major version update because generated IDs containing non-ASCII characters could change, resulting in the potential for existing hyperlinks to no longer link to the correct place on the page. In these cases, hyperlinks will still link to the same page, but to the top of the page instead of the correct location on the page.

Only URLs containing non-ASCII unicode characters (including non-latin letters) are affected.

Previously:
Заголовок, содержащий 29 не-ASCII символов ---> 29-ascii

Now:
Заголовок, содержащий 29 не-ASCII символов ---> заголовок-содержащий-29-не-ascii-символов

Downloads

Fix left-aligned anchors

@bryanbraun bryanbraun released this Sep 23, 2015 · 68 commits to master since this release

Fixes #39.

Also updates dev dependencies, including a major update to Eslint.

Downloads