How do you hide a page included by jquery mobile. I would like to have a mobile version of the site and a desktop version but the mobile version automatically loads up. How do I change this?
code here:
<!DOCTYPE html>
<html>
<head>
<!-- For Mobile Devices -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
<link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="../global/global.css" rel="stylesheet" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div >
<!-- The View Page (Summary) -->
<div data-role="page" id="summary">
<div data-role="header">
</div>
<div data-role="main" class="ui-content">
<div class="jumbotron container">
<center>
<img src="removeLogo.jpg" />
</center>
<h2 class="txt-center"><u>Controls</u></h2>
<a class="btn btn-default">View</a>
</div>
</div>
<div data-role="footer">
</div>
</div>
<div data-role="page" id="summary">
<div data-role="header">
</div>
<div data-role="main" class="ui-content">
<div class="jumbotron container">
<center>
<img src="removeLogo.jpg" />
</center>
<h2 class="txt-center"><u>Controls</u></h2>
<a class="btn btn-default">View</a>
</div>
</div>
<div data-role="footer">
</div>
</div>
</bod
y>
The DOM is not ready at the time your script runs. Put it in a DOM ready event handler:
Alternatively, move your JavaScript to the end of the body (just before the closing
</body>tag is the common place, but anywhere after the elements you need to refer to will work). By doing that, by the time your script is parsed, the browser has already parsed the preceding markup and has an almost-complete DOM tree ready for you to access.