var syncable_download_basic = function () { //rename filename, var, and value of that.HANDLER_TYPE_NAME var that= this; that.HANDLER_TYPE_NAME = 'download'; that.run = function(seconds, record) { $('.download_item').each(function () { $(this).removeClass('active'); }); $('.download_item[data-download_id=' + record['data']['download_id'] + ']').addClass('active'); }; return that; };