开发者

jQuery Number to Number scrolling

OK, I know开发者_运维知识库 you can change a id or class text using this $("#test").text("NUMBER_HERE"); but... using jQuery, instead of statically going from one number to the next... is there a way so it counts down or up depending on the number you picked?

Thanks


Without actually writing the code, as it looks like you know jQuery already, I think it's the :contains keyword you are looking for.

http://api.jquery.com/contains-selector/

So get the number, from the text of the element you selected, and then decrement or increment it by one, use contains and repeat till you get to the target number.

Your question is a little vague so I hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜