Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ahmetozantekin/another

Little jQuery plugin for add alternative href attributes to anchors
https://github.com/ahmetozantekin/another

Last synced: about 1 month ago
JSON representation

Little jQuery plugin for add alternative href attributes to anchors

Awesome Lists containing this project

README

        

# Another JS

Another JS is a little library which define alternative sources for your links.
When your ```href``` target is down or fail because of somethings, ```another``` automatically route to ```data-another``` target.

#### Install with Bower

```bash
bower install another
```

#### Easy Integration

- Include jQuery (1.11.3)
- Call in HTML
- Add ```data-another``` attribute to element which you want
- Add ```another()``` relation to your element in js code

#### Step 1: Include JS Files into your HTML

```html




```

#### Step 2: Add attribute to your link element
```html
It's my cool link text
```

#### Step 3: Activate plugin for element in JS
```javascript

$(function() {
$('a').another();
})

```