最新回答 / Alice_hhu
Handlebars.registerHelper("isfirst",function(value,option){if (value == 0) {return option.fn(this);}});檢查一哈這段代碼有木有寫錯,會不會是helper的名字"isfirst"拼錯了
2017-08-21
分頁樣式2
.pag li.cur{
background-color: #FFEDB2;
}
.pag li.clickable{
background-color: #D6F2FF;
}
.pag li.clickable:hover{
cursor: pointer;
background-color: #B9CBF7;
}
.pag li.cur{
background-color: #FFEDB2;
}
.pag li.clickable{
background-color: #D6F2FF;
}
.pag li.clickable:hover{
cursor: pointer;
background-color: #B9CBF7;
}
2017-08-20
分頁樣式1
.pag ul{
margin-top: 60px;
margin-bottom: 60px;
text-align: center;
}
.pag li{
width: 40px;
height: 40px;
line-height: 40px;
display: inline-block;
border-radius: 50%;
background-color: #F0F0F0;
}
.pag ul{
margin-top: 60px;
margin-bottom: 60px;
text-align: center;
}
.pag li{
width: 40px;
height: 40px;
line-height: 40px;
display: inline-block;
border-radius: 50%;
background-color: #F0F0F0;
}
2017-08-20
這段在控制臺上提示報錯,Handlebars未定義
var t = $("#template").html();
console.log(t);
// f是handlebars編譯之后生成的函數(shù)
var f =Handlebars.compile(t);
console.log(f);
// 參數(shù)打他傳入之后的HTML的字符串
var h = f(data);
console.log(h);
$("#card3").html("woshi ");
var t = $("#template").html();
console.log(t);
// f是handlebars編譯之后生成的函數(shù)
var f =Handlebars.compile(t);
console.log(f);
// 參數(shù)打他傳入之后的HTML的字符串
var h = f(data);
console.log(h);
$("#card3").html("woshi ");
2017-08-18