1.2.1 • Published 7 years ago

x-link v1.2.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 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

7 years ago

1.2.0

7 years ago

1.1.2333

7 years ago

1.1.22

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago