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

https://github.com/angelodlfrtr/lazyloadjs

Implementing Lazy Load ( http://github.com/fasterize/lazyload ) for Ruby on Rails
https://github.com/angelodlfrtr/lazyloadjs

Last synced: 3 months ago
JSON representation

Implementing Lazy Load ( http://github.com/fasterize/lazyload ) for Ruby on Rails

Awesome Lists containing this project

README

        

# Lazyloadjs

Implementing LazyLoad ( http://github.com/fasterize/lazyload ) for Ruby on Rails

## Installation

Add this line to your application's Gemfile:

gem 'lazyloadjs'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lazyloadjs

## Usage

In your `application.js` :

```javascript
...
//= require lazyload
...
```

Restart your application. Lazy load is now availlable.

This gem provide simple helper generate requiered attributes in the img tag :

```ruby
image_lazy 'https://upload.wikimedi....png'
# =>

image_lazy 'https://upload.wikimedi....png', alt: "Google logo"
# => Google logo

# etc.
```

## Contributing

1. Fork it ( http://github.com/angelodlfrtr/lazyloadjs/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request