Link to home
Start Free TrialLog in
Avatar of rustycp
rustycp

asked on

can't get Jquery mobile basic example working

I'm trying out jquery mobile, and I put together this basic code example from the samples on the website.  However the screenshot below shows that the display is cleary not right.  Can someone tell me what I'm doing wrong?  Thanks in advance!

<!DOCTYPE html>
<html>
<head>
	<title>Page Title</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
	<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>

<div data-role="page">

	<div data-role="header">
		<h1>Page Title</h1>
	</div>

    <div data-role="controlgroup" data-type="horizontal">
        <a href="#" class="ui-btn ui-corner-all">No icon</a>
        <a href="#" class="ui-btn ui-corner-all ui-icon-delete ui-btn-icon-left">Left</a>
        <a href="#" class="ui-btn ui-corner-all ui-icon-delete ui-btn-icon-right">Right</a>
        <a href="#" class="ui-btn ui-corner-all ui-icon-delete ui-btn-icon-right">More</a>
    </div>

	<div data-role="footer">
		<h4>Page Footer</h4>
	</div>
</div>

</body>
</html>

Open in new window


This is my screenshot in Chrome 39:

User generated image
And here's my inspector view:

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Attach the actual page here.
Avatar of rustycp
rustycp

ASKER

Actually that appears to be the problem.  I copied and pasted this code straight from the jquery mobile website and I guess these characters came over with them, but these characters were not viewable in my editor.  I messed around with the encoding in my editor (notepad++) by changing to utf-8 and was able to see all the extraneous characters, and deleted them, and it looks way better now.