Last change
on this file since 200 was
200,
checked in by vmipsl, 13 years ago
|
Livraison _ confs + extrations path /resources + visualisation images/bouton
|
File size:
978 bytes
|
Line | |
---|
1 | /* |
---|
2 | This code automatically integrates Flickr thumbnails with Slimbox. |
---|
3 | It will scan for all links around thumbnail images pointing to Flickr photo PAGES. |
---|
4 | Note that you don't need to add rel="lightbox" to these links. |
---|
5 | When clicking on a Flickr thumbnail, Slimbox will open and display the medium-sized image. |
---|
6 | The title attribute of the link (or the alt attribute of the thumbnail if not available) will be used |
---|
7 | as description text, and a link to the Flickr photo page will be added under the description. |
---|
8 | |
---|
9 | Add the following code to the autoload code block. |
---|
10 | */ |
---|
11 | |
---|
12 | if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) { |
---|
13 | window.addEvent("domready", function() { |
---|
14 | $$("a[href^=http://www.flickr.com/photos/] > img:first-child[src]").getParent().slimbox({}, function(el) { |
---|
15 | return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"), |
---|
16 | (el.title || el.firstChild.alt) + '<br /><a href="' + el.href + '">Flickr page</a>']; |
---|
17 | }); |
---|
18 | }); |
---|
19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.