我正在一个食谱页面上的食谱网站(除了这个问题几乎完成)上工作,我有食谱服务输入字段和食谱成分。
我的问题是,如果服务发生变化,我想使用 jquery 动态更改配方成分
我见过类似的封闭威胁,但它对我没有帮助,我的确切代码看起来像这样
Serving: <input type="text" name="serving" class="serving" value="5"/> persons
<h3>ingredients</h3>
<ul class="ingredients">
<li class="ingredient">
<span class="amount">1</span> cups
<span class="name"><a href="http://www.mysite.com/ingredient/yogurt/">yogurt</a></span>
</li>
<li class="ingredient">
<span class="amount">2</span> tbsp
<span class="name"><a href="http://www.mysite.com/ingredient/yogurt/">chillies</a></span>
</li>
<li class="ingredient">
<span class="amount">3</span> pieces
<span class="name"><a href="http://www.mysite.com/ingredient/yogurt/">butter</a></span>
</li>
</ul>
我非常感谢任何帮助,让我完成我的待定网站
问候