Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $("#content img").hover(function() {
- var imageCaption = $(this).attr("alt");
- if (imageCaption != '') {
- var imgWidth = $(this).width();
- var imgHeight = $(this).height();
- var position = $(this).position();
- var positionTop = (position.top + imgHeight - 26)
- $("<span class='img-caption'><em>" + imageCaption +
- "</em></span>").css({
- "font-style": "normal !important",
- "color": "#fff",
- "position": "absolute",
- "top": "200px",
- "left": "5px",
- "width": "80%"
- }).insertAfter(this);
- }},function(){$(this).siblings('.img-caption').remove();}
- );
- </script>
- .img-caption {
- font-style: normal !important;
- color: #fff;
- position: absolute;
- top: 200px;
- left: 5px;
- width: 80%;
- pointer-events: none;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement