开发者

Integrating JQuery for use with Blackberry Widgets

开发者 https://www.devze.com 2022-12-10 07:29 出处:网络
At the WES 2009 event RIM announced that they were almost 100% tested with using JQuery in W开发者_开发知识库idget development, does anyone know how this works?

At the WES 2009 event RIM announced that they were almost 100% tested with using JQuery in W开发者_开发知识库idget development, does anyone know how this works?

I've tried following the demo from their site and added the following:

<head>
    ....
    <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
</head>
<body>
    ....
    <a href='#' id="viewDets">View Details</a>
</body>

I've then added a standard jQuery click event in the other included js file:

$(function() {
    $('#viewDets').click(function() {
        alert('hi');
    });
});

but when I click on the #viewDets linke nothing is happening. I tried using an <input type="button" id="viewDets"> but nothing with this either.

Lastly I tried adding a manual onclick="testJQuery()" to a button and then had the javascript as

function testJQuery(){
  alert($);
}

which alerted the following:

function (E, F) {
  return new o.fn.init(E,F)
}

which shows that jQuery was loaded correctly? Does this mean that currently RIM don't support using jQuery in their widgets or do they have a seperate js file or something?


JQuery is unsupported on the BlackBerry browser, as it doesn't implement the entire DOM. You may have better luck with XUI.


jqlite is a BlackBerry 5.0 compatible subset of jQuery, it works pretty well.

0

精彩评论

暂无评论...
验证码 换一张
取 消