function calcAmount() { var len = $(container).find('.block').length amount.text(len); console.log(len); }