07-28-2012 08:14 AM - edited 07-28-2012 08:20 AM
Hi All
I am very new to blackberry webworks application development. I have started my application with jQuery mobile for all BB devices (touch, non touch, touch and type) of OS 6 and 7 with single codebase.
Here I have some issues related to button click and touchend event.
Basically touchend event is working with buttons for touch device(Torch 9810) but not working with non-touch device(Bold 9780), which is expected.
click is working fine for non-touch devices but for touch devices it not working properly. When I am touching button it is getting focus on first time then firing click event twice on second touch.
$('#loginpage').live( 'pageshow',function(event){
$("#loginButtonId").live("click", callLogin);
});
function callLogin(event)
{
// login logic here
}
Can anyone tell me, whats wrong here or any other tricks to resolve that issue.
Regards-
SubhaMaz
Solved! Go to Solution.
07-28-2012 11:50 AM
07-29-2012 12:00 PM
Hi WebCreep
Thanks for quick reply.
I could not get your point properly. I am giving my HTML code here. Can you please explain how to implement "plane png image" in this HTML code here.
<a href="#" data-role="button" data-inline="true" data-theme="b" data-mini="true" id="loginButtonId" name="loginButtonName" x-blackberry-focusable="true">Login</a>
07-30-2012 09:39 AM
<a href="#" data-role="button" data-inline="true" data-theme="b" data-mini="true" id="loginButtonId" name="loginButtonName" x-blackberry-focusable="true"><img src="1.png" width="50" height="10"></a>
click webcreep.in/1.zip download this and see weather it works or no
if its not then tell me i will do one more and give
08-28-2012 09:30 AM
Hi
use the JQuery Mobile http://jquerymobile.com/blog/2012/07/12/jqm-1-1-1/
08-29-2012 05:04 AM
This issue is supposed to be resolved.
Following code will give the idea-
var flag = false;
$('#loginpage').live( 'pageshow',function(event){
$("#loginButtonId").bind("touchend click", callLogin);
});
function callLogin(event)
{
if (!flag) {
flag = true;
setTimeout(function(){ flag = false; }, 100);
// login code
}
}