Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
select2 multiple select of total sum problem
$(document).ready(function() {
    $('#servicechart').select2();
    var sum = 0; 
    $('.servicechart').change(function() {
        if ($(this).val() != '') {

            var id = $(this).val();
            var Url = "{{ url('/service/chart/get') }}";
            var producturl = Url + "/" + id;

            $.ajax({
                method: "get",
                url: producturl,
                success: function(get_servicechart)

                {
                    sum = sum +  parseInt(get_servicechart.service_price);
                    
                    $('.chartPrice').val(sum);

                }

            });

        } else {
            $('#chartPrice').val('');
            sum = 0;
        }

    });
    

});

i am doing it in Laravel.i just want to sum all the selected value in chart total price & when i delete one select value than total will decrease

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!