2011-11-14 10 views
1

私は画像ギャラリーを持っており、その中にスリムボックスを使用しています。タイトル/キャプションにリンクを追加できたので、ギャラリーの画像をクリックまたはホバーした後に表示される画像にリンクを追加することが可能かどうかを知りたいと思います。Slimboxに表示される画像にリンクを追加することはできますか?

<a rel='slimbox' href="images/img2.jpg" title="&lt;a href=&quot;http://www.google.com&quot; &gt;Google&lt;/a&gt;"> 
    <img class="cloudcarousel" src="images/img1.jpg" width="128" height="164" alt="" /> 
</a> 
+0

「画像にリンクを追加することができますか?」とはどういう意味ですか?テキストとしてのリンク、またはそのリンクに行くためにクリックできるもの? –

+0

私は「img2.jpg」をクリックすると、特定のページにリダイレクトされます。 – Googler

答えて

0

はい。タイトル/キャプションを各画像に追加することができます。しかし、画像へのリンクを直接追加することはできません。 Slimbox demoのようにキャプションにリンクを追加してください。ソースを確認してください。あなたはカスタマイズするためのアイデアを得ることができます。

<script type="text/javascript">//<![CDATA[ 
    window.addEvent("domready", function() { 
     if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) { 
      $$("a[href^=http://www.flickr.com/photos/] > img:first-child[src]").getParent().slimbox({ 
       loop: true, 
       initialWidth: 1024, 
       initialHeight: 768, 
       overlayOpacity: 0.6, 
       overlayFadeDuration: 200, 
       resizeDuration: 1000, 
       resizeTransition: Fx.Transitions.Elastic.easeOut, 
       counterText: "This is image <strong>{x}</strong> on a total of <strong>{y}</strong> in this fabulous Flickr image gallery", 
       previousKeys: [37, 80, 16], 
       nextKeys: [39, 78, 17], 
      }, function(el) { 
       return [el.firstChild.src.replace(/_[mts]\.(\w+)$/, ".$1"), 
        (el.title || el.firstChild.alt) + '<br />Visit the <a href="' + el.href + '">Flickr page</a> for this picture.']; 
      }); 
     } 
     try { 
      _gat._getTracker("UA-760577-1")._trackPageview(); 
     } catch(e) {} 
    }); 
//]]></script> 

<h2>Customization</h2> 

    <p>You can change every parameter of Slimbox and make it work with any kind of link or element.<br /> 

    Below is an example of integration with Flickr links and custom options.</p> 

    <p><a href="http://www.flickr.com/photos/[email protected]/345009210/"><img src="http://farm1.static.flickr.com/159/345009210_1f826cd5a1_t.jpg" alt="A nice bee." /></a><a href="http://www.flickr.com/photos/alphageek/233472093/" title="Keyboard navigation is also customized here so you can use the Shift and Ctrl keys to navigate between images. Also, navigating to the next image will bring you back to the first one (loop option)."><img src="http://farm1.static.flickr.com/85/233472093_1f1d235e7b_t.jpg" alt="Flowers" /></a></p> 
+0

投稿してくれてありがとうございますが、前にも言及しましたが、すでにリンクに画像を追加しています。 – Googler

関連する問題