Skip to content

Commit

Permalink
Drop 'how to initialize' part from README
Browse files Browse the repository at this point in the history
This is no longer required due to 232dc1a
  • Loading branch information
mschnitzer committed Mar 11, 2019
1 parent 232dc1a commit 12ec13a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ Please make sure that `jquery` is always loaded before lightbox2!

lightbox2 is now ready and can be used within your Rails application!

To initialize the lightbox, please put the following code between your `<head/>` tag in your `app/views/layouts/application.html.erb` file:
```html
<script type="application/javascript">
$(document).on('turbolinks:load', function(event) {
lightbox.init();
});
</script>
```

You can copy and paste the following line somewhere in a `view` to test the lightbox:
```ruby
<%= link_to 'my picture', image_path('my_picture.jpg'), data: { lightbox: 'my-lightbox-name', title: 'title or caption for this image' } %>
Expand Down

0 comments on commit 12ec13a

Please sign in to comment.