Solved

can't get Jquery mobile basic example working

Posted on 2014-11-26
4
88 Views
Last Modified: 2014-11-28
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:

chrome 39
And here's my inspector view:

jquery-mobile-devtools-screenshot.jpg
0
Comment
Question by:rustycp
  • 2
4 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40467882
What are all the non utf characters (the diamond/question mark) ???
0
 
LVL 58

Expert Comment

by:Gary
ID: 40467888
Attach the actual page here.
0
 
LVL 2

Author Comment

by:rustycp
ID: 40467900
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.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 40467916
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question