Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Contributor
devoldmx
Posts: 13
Registered: 12-21-2011
My Carrier: Developer

WebWorks and jQuery Mobile

Hi, I'm doing an application using jQuery Mobile, but I have trouble with focus-based navigation. I use multi-page ( http://jquerymobile.com/demos/1.0/docs/pages/multipage-template.html ) I want to add x-blackberry-focusable in elements on both pages (See the example in the link) but the focus is lost and I'm not able to navigate.

 

I've tried:

 

Writing directly the focusable option in the element

<a href="#two" data-role="button" x-blackberry-focusable="true">

 

 

Writing the focusable option in a external div

<div x-blackberry-focusable="true"><p><a href="#two" data-role="button">Show page "two"</a></p></div>

Adding the focusable attribute via javaScript

 

<div id="elementToFocus"><p><a href="#two" data-role="button" onclick="handleFocus();">Show page "two"</a></p></div>

 

function handleFocus(){
$("#elementToFocus").attr("x-blackberry-focusable", "true");
}

 

but none of them work. When I change between pages focus is lost (in OS 5, 6 and 7), although without focus-based navigation works. Any ideas???

Please use plain text.
Developer
greenback
Posts: 205
Registered: 10-17-2010

Re: WebWorks and jQuery Mobile

As an alternative to jQuery mobile, you should check out bbUI, a framework built to work across all smartphone OS5+.
Its super simple to implement and will most likely solve your issues with navigation based focus.

Documentation:
 https://github.com/blackberry/WebWorks-Samples/tree/master/UIExamples 

Also: https://github.com/tneil/bbUI.js 

 

:Genius:

Paid Playbook Apps: MUNI Maps | The Truth | Canada Lotto | Google Docs Launcher | Pinterest Launcher | (Coming soon) : REPOxy | Pets2Go | Git Reference: Free Playbook Apps | San Francisco Libraries
OS7+ Apps (Coming soon): GitHub Terminal | Canada Lotto Phone
Please use plain text.
BlackBerry Development Advisor
jeffheifetz
Posts: 508
Registered: 07-18-2011
My Carrier: Rogers

Re: WebWorks and jQuery Mobile

You could try patching your SDK and seeing if the new navmode makes any difference.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.