Jetpackで,ページをgetして,jQueryオブジェクトにしようとしたところ,ページの内容は取得できるが,jQueryオブジェクトが作られない.
jetpack.statusBar.append({ html: "get", onReady: function(widget){ $(widget).click(function(){ $.get('http://f.hatena.ne.jp/masa138/', function(res) { console.log(res.length); console.log($(res)); }); }); } });
Jetpackではない,普通のjQueryだと,これが動く.
$.get('http://f.hatena.ne.jp/masa138/', function(res) { console.log(res.length); console.log($(res)); });
エラーメッセージもよく分からない感じだし,よく分からない……
追記
id:con_mameさんにコメントで教えていただいた.
コンテキストを指定して,
console.log($(res,widget));
と書くと動くらしい.
確かに,エラーメッセージを見ると,context.createElement is not a function.と言っていた.