Solved

can't get Jquery mobile basic example working

Posted on 2014-11-26
4
81 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
Comment Utility
What are all the non utf characters (the diamond/question mark) ???
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
Attach the actual page here.
0
 
LVL 2

Author Comment

by:rustycp
Comment Utility
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
Comment Utility
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now