2

I did a small javascript program for BlackBerry OS 5, using jQuery. Unfortunately, when trying in actual device, those functions are not executed:

$(".colorboard").css("background-color","#FF0000");
$(id).unbind('click');
$(id).bind('click', function(event){ alert("hello!")});
$(id).html(mytext);

Why it does not work? There are alternatives that will work on BB OS 5? I tried zepto.js but no luck.

4

2 回答 2

1

This is the part where it failed:

$(".colorboard").css("background-color","#FF0000");

So far I also didn't know how to support it, even jQuery mobile theme give-up on this problem. Please refer to this post for more information.

于 2012-05-25T09:14:20.933 回答
1

For BB OS5 use every time the element tag name with a class like this:

$("div.colorboard").css("background-color","#FF0000");
于 2013-05-27T12:12:48.467 回答