javascript - using jQuery in PebbleJS apps -
how can add jquery library pebblejs apps? here's code:
var ui = require('ui'); var ajax = require('ajax'); var $=require('jquery'); $.getjson(url); var card = new ui.card({ title:'last.fm stat', subtitle:'fetching...' }); card.show();
here's error receive:
[info] ocess_manager.c:368: heap usage app <lastfm sta: total size <48584b> used <6256b> still allocated <28b> [phone] pebble-app.js:?: javascript error: error: cannot find module 'jquery' @ object.loader.require (loader.js:34:11) @ require (loader.js:41:48) @ object.loader (app.js:9:7) @ object.loader.require (loader.js:44:10) @ require (loader.js:41:48)
you cannot use jquery. pebblejs uses jquery mobile specifications of jquery natively. not need require in app part of it.
that said, may want research , understand difference between two, functionality has been removed mobile side. 1 specific instance remember jquery mobile has responsetext not responsexml. why many people have lot of work arounds in place manage xml feeds in apps when unable retrieve json api.
Comments
Post a Comment