Redirect mobile users to separate URL
-
fancybox is great– but it looks terrible on small screens.
is there a way i can redirect mobile users to a different url, while retaining fancybox functions for desktop users?
I am trying something like this– but no success so far:
<“a” href=”void(0)”>
link<script type=”text/javascript”>
jQuery(document).ready(function($){
var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/);
$(‘#link’).click(function() {
if (isMobile){window.location.href = ‘#link’;}
else{window.location.href = ‘#fancyboxID-3’;}
});
});
</script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Redirect mobile users to separate URL’ is closed to new replies.