title: Getting error on calling function from jquery ajax success
body: <p>I am trying to call a function from jquery ajax success. That function is for summation of input field value. It's completely fine if I not use function. But problem is when I use and call function. Here is my code</p>
  
  <pre><code>success: function (response) {
            if (response==0){
                alert('Item not found');
                $("#add_item").val("");
            }
            else {
                $('.item-content').append(response);
                $("#add_item").val("");
                sum_price();
            }
          }  
  
   function sum_price() {
          var sum = 0;
          $('.per_item_price').each(function() {
              sum += Number($(this).val());
          });
      document.getElementById("total_tk").innerHTML = sum_price;
  }
  </code></pre>
  
  <p>It appends in html </p>
  
  <blockquote>
    <p><strong>Total : function sum_price() { var sum = 0; $('.per_item_price').each(function() { sum += Number($(this).val()); }); document.getElementById("total_tk").innerHTML = sum_price; }</strong> not value </p>
  </blockquote>