HummingBirdAnimeClient/public/js/anime_collection.js

17 lines
414 B
JavaScript
Raw Normal View History

(function($, undefined) {
function search(query, callback)
{
2015-12-08 14:52:59 -05:00
$.get(BASE_URL + 'collection/search', {'query':query}, callback);
}
2015-12-08 14:52:59 -05:00
$("#search").on('keypress', $.throttle(750, function(e) {
var query = encodeURIComponent($(this).val());
search(query, function(res) {
var template = $.templates("#show_list");
var html = template.render(res);
$('#series_list').html(html);
});
}));
}(jQuery));