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.
Activelab.io is a web development blog
for open-source technologies. Here you will find code-snippets,
tutorials and posts on useful
developer tools and resources.
Activelab is written by web developer David Bainbridge.