Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

multiplicar celulas js

$('table input').on('input', function () {
   var $tr = $(this).closest('tr'),
       tot = 1;
   $tr.find("input").each(function (i) {
      tot = tot * parseFloat(($(this).val()).replace(',', '.'));
      if(i == 1){
         $tr.find('td:last p').text(tot);
         
         var tg = 0;
         $tr.closest('table').find('tr p').not(":last").each(function(){
            tg += parseFloat(($(this).text()).replace(',', '.'));
         });
         
         $('#total_geral').text(tg);
      }
   });
   
}).trigger('input');
Comment

PREVIOUS NEXT
Code Example
Javascript :: simple-react-validator 
Javascript :: counter random interval 
Javascript :: api dfetch data in reactjs 
Javascript :: outlet context remix js 
Javascript :: javascript array table append loop 
Javascript :: Example of Promise.any() and AggregateError in es12 
Javascript :: Pass Props to a Component Using Short circuit evaluation in react 
Javascript :: Rest and spread operators in ES6 
Javascript :: javascript extrsct object 
Javascript :: set style javascript and cancel it to use default 
Javascript :: async await slow down code 
Javascript :: documetn 
Javascript :: javascript copy input value to clipboard 
Javascript :: replace div content javascript 
Javascript :: change color jquery css 
Javascript :: animateOut: "slideOutUp", animateIn: "slideInUp", not working 
Javascript :: for (var i = 0; i < 3; i++) { setTimeout(function() { console.log(i); }, 1000 + i); } 
Javascript :: jquery console.log object file 
Javascript :: create 24 hours array like 00:00 to 23:30 
Javascript :: preventClosingTab 
Javascript :: jquery split multidimensional array 
Javascript :: customize bar in chartjs 
Javascript :: create a virtual reality website using react js 
Javascript :: nodejs css cotent tipe 
Javascript :: create ew angular app 
Javascript :: props with ternary in react 
Javascript :: url(image loacation) give a class 
Javascript :: how to give id dynamically in javascript 
Javascript :: javascript split domain 
Javascript :: firebase is there a way to rename a document 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =