Last change
on this file since 11947 was
11947,
checked in by flop25, 13 years ago
|
js works with the parameter considerBorders and the others
the title of the thumbnail can be displayed
todo: all this paramaters in config
|
File size:
1.0 KB
|
Line | |
---|
1 | //$(document).ready(function(){ |
---|
2 | /* |
---|
3 | (function($) { |
---|
4 | previewBoxId = 'tooltip'; |
---|
5 | if ($('.thumbnails a, #thumbnails a').length > 0 ) { |
---|
6 | $('.thumbnails a, #thumbnails a').imgPreview({ |
---|
7 | containerID:previewBoxId, |
---|
8 | considerBorders:'true', |
---|
9 | srcAttr: 'imgsrc', |
---|
10 | preloadImages: false, |
---|
11 | }); |
---|
12 | |
---|
13 | } |
---|
14 | |
---|
15 | |
---|
16 | //}); |
---|
17 | })(jQuery);*/ |
---|
18 | |
---|
19 | $('.thumbnails a, #thumbnails a').imgPreview({ |
---|
20 | containerID: 'tooltip', |
---|
21 | srcAttr: 'imgsrc', |
---|
22 | considerBorders:'true', |
---|
23 | // When container is shown: |
---|
24 | onShow: function(link){ |
---|
25 | $('<span>' + $(link).children().attr("title") + '</span>').appendTo(this); |
---|
26 | // Animate link: |
---|
27 | $(link).stop().animate({opacity:0.4}); |
---|
28 | // Reset image: |
---|
29 | $('img', this).stop().css({opacity:0}); |
---|
30 | |
---|
31 | }, |
---|
32 | onLoad: function(){ |
---|
33 | // Animate image |
---|
34 | $(this).animate({opacity:1}, 300); |
---|
35 | }, |
---|
36 | // When container hides: |
---|
37 | onHide: function(link){ |
---|
38 | $('span', this).remove(); |
---|
39 | // Animate link: |
---|
40 | $(link).stop().animate({opacity:1}); |
---|
41 | |
---|
42 | } |
---|
43 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.