The text of a span tag can be retrieved in jQuery using the 'text' function, here's an example:
var year = $('#year').text();
Year will be defined as '2014'.
If you'd like to work with code synthesis on your next project
get in touch via the contact page.
Code Synthesis is a web development blog
for open-source technologies. Here you will find code-snippets,
tutorials and posts on useful
developer tools and resources.
Code Synthesis is written by web developer David Bainbridge.
To get in touch use the contact page.