我有几个这样的标签:
<a class="classCover" href="#">1 Comment</a>
我想颠倒一下单词的顺序:
Comments (1)
我的功能是这样的,但不起作用:
$('.classCover').each(function(){
$(this).text().split(' ').reverse().join(' ');
});
请问,有什么想法吗?
你几乎已经得到了它,只是你没有对结果做任何事情
$('.classCover').each(function(){
$(this).text($(this).text().split(' ').reverse().join(' '));
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)