How to change class to link: when user uses ipad.
I use the lightbox slidebox to display the video, but I would like the lightbox to change when the user uses the ipad.
<a href="#" class="video">Watch</a>
e.g. web version
/* Video overlay */ // Hide on load $('.video-player').hide(); // Show the video player $('.video').click(function() { $('.video-player').show('slow'); return false; }); //Hide the video player $('.close-video').click(function() { $('.video-player').hide('slow'); return false; })
IPad version
/* Video overlay */ // Hide on load $('.video-player').hide(); // Show the video player $('.video').fancybox({ 'content' : $('.video-player').html(), 'titlePosition' : 'inside', 'transitionIn' : 'none', 'transitionOut' : 'none', 'overlayColor' : '#fff', 'overlayOpacity' : 0, 'scrolling' : 'no', 'onComplete' : function(){ $('.pop-detail input.button, .pop-detail a').click(function(){ $.fancybox.close(); }) }, 'onClosed' :function(){ } }); //Hide the video player $('.close-video').click(function() { $('.video-player').hide(); return false; })
Thank you for your help.
source share