2

I am attempting integrate jQuery Mobile into an existing mobile page. I want to use the collapsible element, and form features.

When I include the js file, and load the page, the page is rendered blank. When it is not included it is rendered correctly. I have added data-role="page" and "content" as below:

Looking in Firebug I see the body element has the 'ui-mobile-viewport' class on it and it's visibility is set to hidden; its child elements have display = none.

I am getting this error in the console when debugging (line 5014) of jquery-mobile-1.0.1.js:

 $el.prop is not a function if ( $el.prop("disabled") ) { 

Code below:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title><%=PageTitle%></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"/> <link rel="stylesheet" type="text/css" href="<%=CssPath%>/jquery.mobile-1.0.1.css" media="screen" /> <script type="text/javascript" src="<%=JsPathShared%>/jquery.js"></script> <script type="text/javascript" src="<%=JsPath%>/page.js"></script> <script type="text/javascript" src="<%=JsPath%>/jquery.mobile-1.0.1.js"></script> </head> <body onload="setTimeout(function() { window.scrollTo(0, 1) }, 100);"> <div data-role="page" id="page-wrap" > <header> <%RenderBanner();%> </header> <div data-role="content" class="section-wrap"> <%Render();%> <footer> <nav> <%RenderNavigation();%> </nav> <%RenderFooter();%> </footer> </div> </div> <%=GoogleAnalytics()%> </body> </html> 
1
  • any errors in the console? link to demo? Commented Feb 2, 2012 at 2:48

1 Answer 1

1

Consider checking out the jQuery Mobile Boilerplate project from Github. It contains a complete jQuery Mobile project along with code snippets you can use to compare your code to a working project.

https://github.com/commadelimited/jQuery-Mobile-Boilerplate

Sign up to request clarification or add additional context in comments.

2 Comments

This was selected as the answer, but with no explanation. Can you let us know what the solution actually was?
Yes please. I have this trouble too

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.