使用Handlebar和OpenDatabase时,我遇到了小问题。当你点击一个链接,却没有任何反应
我的JS。
db.transaction(function (tx) {
tx.executeSql('SELECT * FROM exhibition', [], function (tx, results) {
var source = document.querySelector("#exhibition-template").innerHTML;
var data = [];
template = Handlebars.compile
我正在使用Handlebars.js作为我的Backbone.js应用程序的模板工具。我的视图中的渲染函数通常如下所示:
var source = $("#round").html();
var template = Handlebars.compile(source);
var context = JSON.parse(JSON.stringify(this.model));
var html = template(context);
$(this.el).html(html);
return this;
通过以下代码(这是调用上述代码的代码)将上述内