1.2.1 • Published 6 years ago

x-link v1.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

X-Link will grab any links it finds within a given container.

If the href attribute points to a host that is not the same as the current host, it's target attribute will be set to _blank i.e. new window / tab (depending on browser behaviour).

Elements which already have a target attribute will be ignored.

Installation

npm install x-link

Usage

var XLink = require("x-link");

// Grab all links on page
XLink.init();

// Grab only links on within "#my-links"
var el = document.getElementById("my-links");
XLink.init(el);
1.2.1

6 years ago

1.2.0

6 years ago

1.1.2333

6 years ago

1.1.22

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago