对每个添加的div进行数学运算. [英] Do math with every added div.

查看:92
本文介绍了对每个添加的div进行数学运算.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我需要对每个数字乘以div.class(240).最初只有一个div.class,但用户可以添加具有相同类的新div.

问题在于,当用户添加或删除div时,乘法结果不会改变.

http://jsbin.com/tuguredu/1/edit

有人可以帮我吗.

Hello, I need to make a multiplication of a div.class per a number (240). At the begging there''s only one div.class but user can add new divs with the same class.

The problem is that the result of the multiplication does not change when the user adds or removes divs...

http://jsbin.com/tuguredu/1/edit

Can someone help me please.

推荐答案

首先,更改此内容:
First, change this:


(文档).ready(function(){
(document).ready(function() {


(.total").text(
(".total").text(


这篇关于对每个添加的div进行数学运算.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆