在jquery 环境中使用cocos2d-js 的函数会报错,请教该怎么在jquery 环境中使用cocos2d-js 的函数
$(document).ready(function(){ $("p").click(function(){
this.jiantou3 = new cc.Sprite("#ui_btn_home_zuoyoujiantou0001.png");
this.jiantou3.x=350;
this.jiantou3.y=200;
this.addChild(this.jiantou3, 1); //这里报错
});});
this.addchild 函数会报错“Uncaught TypeError: this.addChild is not a function”