PhilipK Posted July 2, 2011 Share Posted July 2, 2011 Hello, I need to use Jquery or plain Javascript to reverse the order of a list of <span> tags. They all have the class "tweet_text" Any suggestions are greatly appreciated. Quote Link to comment Share on other sites More sharing options...
WebStyles Posted July 3, 2011 Share Posted July 3, 2011 how about: document.getElementsByTagName('span'); to read them all into an array, then you can get each one's content with spanList[0].innerHTML; then just reverse them (or whatever) and write them back with the same code: spanList[0].innerHTML = 'whatever'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.