简体   繁体   中英

change specific span text based on array value using jquery

I have some input hidden value in jquery array and i want to change the value of span based on array. Here is the jsfiddle .

Now what i want is when 0 is triggered in an alert box then my current span text will change with some text, not all span text like at this time.

你可以像这样设置你想要的文本:

$('input[name="quantity"][value="0"]').parent().find('button span').html('some text');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM