Mobile Page redirection

Is there any way this code can be implement if its a mobile website jump to a mobile page else
jump to a desktop page.  Can the media query code be implemented in any way to do so since media query is checking if is a mobile device then jump to mobile version?

Any Help is greatly appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html;
    <link rel="stylesheet" type="text/css" href="mobile.css" />
  <link rel="stylesheet" type="text/css" href="desktop.css" />
     <style type="text/css">
     @media only screen and (max-width: 480px),  only screen and (max-device-width: 480px), only screen and (max-device-width: 800px){
	#mobile { text-transform:capitalize  }
    <script src="Script/jquery-1.4.4.js" type="text/javascript"></script>

     <script type="text/javascript">
         $(function () {


             $(window).resize(function () {


         function mobileResize() {
             if ($("#mobile").css("text-transform") == "capitalize") {
                 $("#mobile").css("display", "block");
                 $("#desktop").css("display", "none");
             } else {
                 $("#mobile").css("display", "none");
                 $("#desktop").css("display", "block");
<body >
    <form id="form1" runat="server">
    <h1>This device is:  </h1> 
         <div id="desktop">Desktop</div>  

         <div id="mobile">Mobile</div> 


Open in new window

Who is Participating?
zrazakAuthor Commented:
wasnt very specific
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.