Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Posts: 13
Registered: ‎12-21-2011
My Device: Developer
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???

Posts: 614
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

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.


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


Posts: 518
Registered: ‎07-18-2011
My Device: Bold
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)