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
- Host: GitHub
- URL: https://github.com/angelodlfrtr/lazyloadjs
- Owner: angelodlfrtr
- License: mit
- Created: 2014-03-23T13:39:18.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-01T15:09:17.000Z (over 10 years ago)
- Last Synced: 2025-02-02T19:18:19.550Z (4 months ago)
- Language: Ruby
- Size: 118 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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"
# =># 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