我正在使用Phonegap + Zepto + Backbone爲Blackberry OS5開發應用程序。爲了做到這一點,我一直使用Backbone表單來處理子引擎,但由於OS5在jQuery版本高於1.4.4時出現問題,我轉移到了Zepto,但BackboneForms上的render方法停止工作,任何人都可以幫助我它?Backbone-forms + Zepto無法呈現
這也正是它打破了,全部分代碼請點擊這裏https://github.com/powmedia/backbone-forms:
render: function() {
var self = this,
options = this.options,
template = Form.templates[options.template];
//Create el from template - HERE IT BREAKS
var $form = $(template({
fieldsets: '<b class="bbf-tmp"></b>'
}));
//Render fieldsets
var $fieldsetContainer = $('.bbf-tmp', $form);
_.each(options.fieldsets, function(fieldset) {
$fieldsetContainer.append(self.renderFieldset(fieldset));
});
$fieldsetContainer.children().unwrap();
//Set the template contents as the main element; removes the wrapper element
this.setElement($form);
if (this.hasFocus) this.trigger('blur', this);
return this;
},
提前感謝!