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.
精彩评论