Topic: creating caption like links over images with Jquery
Part of the app I am working on is a searchable database of images. Users can add images to a bin, and then in turn print or save as a set. Everything works fine with this code now...
I am currently using Jquery to update a div that shows what images are in the current bin.
which updates the bin when
<% @images.each do |image| %> <%= link_to (image_tag image.stimuli_url(:thumb).to_s, :class => "one_wrap"), image %> <%= link_to 'Add to bin', line_items_path(:image_id => image), :remote => true %> <% end %>
So in my view I have a whole bunch of image thumbnails displayed with a link below each one. I was looking for a solution to only have the link appear over the image to add on .hover or mouseover.
Should I even do this with Jquery? Or should this be a css thing with display:none?
In my attempts to do this I had it where hovering over an image would produce the link...but only over the first image. Do I need to pass a unique id for each div?
any help or link to any help would be greatly appreciated!