activebridge / lazybox

Lazybox is a jQuery-based, simple, lightweight lightbox that can display entire remote pages, images and confirmation dialogs. Replace standard rails confirmations with lazybox just added several rows to your project.

Home Page:lazybox.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next and Previous buttons in image gallery.

alexefremo opened this issue · comments

How you made that Navigation in Lazybox modal? I'm looking the code, but can't find it. I made the output of images too, Add this function to application.js

$(document).ready(function() {
$('a[rel*=lazybox]').lazybox({close: false, modal: false, opacity: 0.5, fixed: true, klass: 'lazybox', speed: 200});
});

the output of images looks like this/:

<% @gallery.each do |gallery| %>

<%= link_to gallery.image.url, :rel => :lazybox do %> <%= image_tag gallery.image.url, :height => 100 %> <% end %>
<% end %>

Thanks in advance!)

Your lazybox links must be one after another one:

<div>
  <a href="http" rel="lazybox"><img alt="height="100" src="http"></a>
  <a href="http" rel="lazybox"><img alt="height="100" src="http"></a>
  <a href="http" rel="lazybox"><img alt="height="100" src="http"></a>
</div>

Oh. ok. thanks!