self.search = function() {
searchRes = $('#search_field').val();
location.hash = "search" + "/" + searchRes;
};
Sammy(function () {
this.get('#search',':searchRes', function() {
this.param.searchRes = $('#search_field').val();
$('.inside').each(function() {
console.log(this.params);
if ($(this).text().search($('#search_field').val()) == -1) {
$(this).parent().addClass('blind');
}
});
});
}).run();
我在 url 中设置了输入值,但我无法获得通过get
函数所需的哈希值。我收到这样的错误:
/#search/resultError {message: "404 Not Found get /#search/result"}