jquery用于更新div内容 [英] jquery for update div content
问题描述
亲爱的专家,
我需要一个jquery来打印一些有条件的数据....
Dear Experts,
I need a jquery to print some datas with some conditions....
<div class = "abc"> Pending </div>
<div class = "abc"> Pending </div>
<div class = "abc"> Ordered </div>
<div class = "abc"> Ordered </div>
<div class = "abc"> Ordered </div>
我有一些Div列表...而且我需要一个jquery来更新div仅待处理到正在处理(不要改变) div有订购)..
我在下面用了一个jquery ......
I have some Div lists... And I need a jquery for update the div containg "Pending" To "Processing" only (Don''t change the div having "Ordered")..
I have used a jquery below...
$('.abc').append('Processing');
当我运行上面的jquery然后它改变所有div ......
PLease帮助我解决这个问题。 ..
谢谢..
Dileep
When i run the above jquery then it changes all div ......
PLease help me to solve this...
Thanks..
Dileep
推荐答案
(' .abc')。append(' Processing');
('.abc').append('Processing');
当我运行上面的jquery然后它改变所有div ......
PLease帮我解决这个问题...
谢谢..
Dileep
When i run the above jquery then it changes all div ......
PLease help me to solve this...
Thanks..
Dileep
你需要检查哪些文本是待定并仅更改。
在添加或添加文本之前,您应该将其设为空白。以下代码将起作用。
You need to check whose text is "Pending" and change only that.
And you should make it blank before appending or adding text. The below code will work.
(' < span class =code-string>。abc')。each( function (){
if (
('.abc').each(function () { if (
这篇关于jquery用于更新div内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!