Using Jquery Mobile in Blackberry Application

Go To StackoverFlow.com

1

I found some code for an rss reader. And I want to use it for my Blackberry App. The code contains html, css and javascript docs. And I wrote config.xml for app. When I compile and try my app on the blackberry simulator, it won't load correctly. It is like the app has no css. I just wonder that when I write something like this:

<div data-theme="e" data-role="header" data-position="fixed" >

Why blackberry can't understand it? Because there is no css explanation in the css file. And I can't see if there is another problem. I hoped I could find my problem =)

Here is some screenshots:

enter image description here enter image description here

Any idea would be great!

2012-04-04 19:44
by jakobiyem


0

1. Make sure you are using the correct jQuery Core version for the jQuery Mobile version you are using. jQuery Mobile 1.0.1 and older get jQuery Core 1.6.4 and jQuery Mobile 1.1.0 and newer get jQuery Core 1.7.2. http://www.jquerymobile.com/download

2. Make sure you are using the correct characters in all the filenames for any assets (like jQuery or jQuery Mobile) that you are loading.

  • For the archive file name, use only alphanumeric characters, and begin file names with a letter.
  • For files within the archive, use only alphanumeric characters, the underscore, or periods. File names must begin with a letter.

Source: https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/bestpractice_compiling_ww_apps_1873324_11.html

Notice that hyphens are not allowed and are used by jQuery's file-naming convention.

2012-04-04 19:50
by Jasper
Thank you for your answer, i updated jquery version but it still continues. I use jquery in hosted files. So files isn't in my folder. I can't understand the problem. - jakobiyem 2012-04-04 20:37
Since you are making a native app, do not rely on CDN's for your core files (since that requires an internet connection). Host the files locally, and name them properly. I'm pretty sure the hyphens in the names of the files is what's messing with you. http://www.jquerymobile.com/download. Download the ZIP archive and host the files on the device. Make sure to remove all hyphens from the filenames, including the CSS image sprite (which requires you to do a search/replace for the old source of the sprite in the stylesheet) - Jasper 2012-04-04 20:40
Thanks for the answer, i couldn't reply and the problem contains. But probably you are right, this was the first example that i tried with jquery mobile, and i could do some errors - jakobiyem 2012-05-14 14:04
Ads