[英]Select and parseint of a class in parent div
im creating a blog post where onclick 'like' it finds the class for the number of likes and adds plus one to it. 我在onclick'like'上创建了一个博客帖子,它查找喜欢次数的类,并为其添加一个加号。 i think i can do this with parse int.. can anyone help me with this > 我想我可以通过解析int来做到这一点。
That is the HTML 那就是HTML
<span class="button_class"><a class="lik_right_stat_like" href="javascript:;">4255 Likes ·</a></span>
This is the javascript.. onclick like works fine.. having trouble parsing the value for the above class and adding one to it. 这是javascript .. onclick之类的方法可以正常工作..无法解析上述类的值并将其添加到其中。 This is the jquery 这是jQuery
$(this).parent("div").find(".lik_right_stat_like").attr("alt", count) parseint()++;
(im quite new to jquery) (对jquery来说是很新的)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.