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