Jump to content
Sign in to follow this  
AndyDesigns

Facebook Link not working

Recommended Posts

So you want mobile users to redirect to mobile version of facebook ?

 

here is a solution for that

<a href="javascript:void(0)" class="link-for-mobile">Click for mobile</a>
<script type="text/javascript">
jQuery(document).ready(function($){
	var isMobile = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/);
	$('.link-for-mobile').click(function() {
		if (isMobile){window.location.href = 'http://example.com';}
	});
});
</script>

make sure jquery is already loaded in the page

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      59,311
    • Most Online
      4,970

    Newest Member
    link.rk01
    Joined
  • Forum Statistics

    • Total Topics
      65,996
    • Total Posts
      454,482
×