Fotorama - clickable images on slider for external URL

0 votes
634 views
added Dec 13, 2018 in Plugins by LC Marshal Captain (25,790 points)

PHP

  1. <? php
  2. //slider content
  3. $slider_img_1 = 'images/main001.jpg';
  4. $slider_text_1 = 'Urban living is about being an animal';
  5. $slider_link_1 = 'livemag/01/';
  6. ?>
  7.  
  8. <div data-img="<?php echo $slider_img_1 ?>" data-caption="<?php echo $slider_text_1 ?>" >
  9. <a href='<?php echo $slider_link_1 ?>' target='_blank'></a>
  10. </div>

 

CSS

  1. .fotorama__html {
  2. a, div {
  3. display: block;
  4. height: 100%;
  5. // Transparent links are not clickable in IE,
  6. // but non-existent background fixes this.
  7. // (Put an empty 1×1 image here to avoid
  8. // errors in console.)
  9. background: url(_.gif);
  10. }
  11. }

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...