I need to do the same thing from this post Pop Images like Google Images But i need to add as same as google image search ie the on hover the image title need to be displayed . I am from java and new to jquery so please help me http://jsfiddle.net/roXon/HmTrw/
Asked
Active
Viewed 950 times
2 Answers
1
In my case I needed more than attribute title
, my images structure is as next:
<ul class="thumbnails">
<li>
<div class="thumbnail">
<img src="/images/200X150.gif" alt="200X150" />
<div class="caption" style="display:none">
HTML Goes here
</div>
</div>
</li>
....
</ul>
you'll need to update plugin ibox after:
el.mouseenter(function() {
ibox.html('');
add this:
$('#ibox').append('<div class="ibox-caption">'+$(this).siblings('.caption').html()+'</div>');
and the css for .ibox-caption should have the same image width:
.ibox-caption {
width: 200px;
}

Community
- 1
- 1

Qussay Najjar
- 561
- 3
- 7
0
Just after the line ibox.html('');
(around line 20 in the JS) add this line:
jQuery('<div />').text(this.title).appendTo(ibox);
You will also want to add some CSS.

Mark Eirich
- 10,016
- 2
- 25
- 27