Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kanety/jquery-simple-lightbox


https://github.com/kanety/jquery-simple-lightbox

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# jquery-simple-lightbox

A jquery plugin for simple lightbox.

## Dependencies

* jquery

## Installation

Install from npm:

$ npm install @kanety/jquery-simple-lightbox --save

## Usage

Build file input field:

```html






```

Then run:

```javascript
$('#gal').simpleLightbox();
```

### Options

Change link selector:

```javascript
$('#gal').simpleLightbox({
links: 'a[rel="lightbox"]'
});
```

Change lightbox owner:

```javascript
$('#gal').simpleLightbox({
owner: 'body'
});
```

Change image extensions:

```javascript
$('#gal').simpleLightbox({
imageExt: /^(jpg|jpeg|png|gif|bmp|webp)$/
});
```

## License

The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).