New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

swipebox

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swipebox

  • 1.4.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Swipebox for Rails

Gem Version Build Status Code Climate Dependency Status swipebox API Documentation

Swipebox | A touchable jQuery lightbox for the Rails asset pipeline

Installation

Add this line to your application's Gemfile:

gem 'swipebox'

Usage

In your CSS manifest file:

*= require swipebox

In your JavaScript manifest file:

//= require swipebox

Use a specific class for your links and use the title attribute as caption.

<a href="big/image.jpg" class="swipebox" title="My Caption">

Bind the swipebox behaviour on every link with the 'swipebox' class.

$('.swipebox').swipebox();

###Options

useCSS : true, // false will force the use of jQuery for animations
useSVG : true, // false to force the use of png for buttons
initialIndexOnArray : 0, // which image index to init when a array is passed
hideCloseButtonOnMobile : false, // true will hide the close button on mobile devices
hideBarsDelay : 3000, // delay before hiding bars on desktop
videoMaxWidth : 1140, // videos max width
beforeOpen: function() {}, // called before opening
afterOpen: null, // called after opening
afterClose: function() {}, // called after closing
loopAtEnd: false // true will return to the first image after the last image is reached of Bootstrap)

Look at the original Swipebox repo for more.

I have modified source a bit from the 1.4.4 version:

  • SCSS instead of CSS because we need the image-url helpers
  • .png -> .svg via class not hardcoded image path

License

The MIT License

FAQs

Package last updated on 22 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc