4

I am designing a website and am using jQuery lightbox 0.5.

On the equipment pages I am using lightbox as a gallery. Everything works on a computer but on an iPad/iPod the Prev/Next buttons do not show up.

I know that it uses a jQuery routine to display them on :mouseover but there is no mouse on these devices. Tapping on the correct side of the button does work, but I'd like the buttons to be there too.

code:

<script type="text/javascript">
    $(function() {
        $('a.StockNumber').lightBox();
    });
</script>

Where StockNumber is the stocknumber of the unit.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Dalgrim
  • 43
  • 4

1 Answers1

1

Try adding the fixed navigation option:

$('a.StockNumber').lightBox({
    fixedNavigation: true
});
Owlvark
  • 1,763
  • 17
  • 28
  • Thank you, I double checked the lightbox site and in the how to use and extended options and found no reference to this fixedNavigation option. Would there be a way to only call this on an mobile device? – Dalgrim Sep 05 '12 at 02:35
  • No problem. It is not on the options page, for some reason. I found it on the example tab. Have a look at [this answer](http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript) to detect touch devices. – Owlvark Sep 05 '12 at 03:05