I have a ‘span’ element inside a ‘table’ ‘td’ element. The span tag has a Title.
I want to get the title of that span tag and pull it out to make it the ‘mouseover’ tip for the ‘td’ element.
For example:
I want to turn this:
<td> <a href='#'><span id='test' title='Acres for each province'>Acres</span></a> </td>
Into this:
<td onmouseover='tip(Acres for each province)'> <a href='#'><span id='test'>Acres</span></a> </td>
EDIT: I don’t think you guys understand. I am trying to put the onmouseover function into the ‘td’ tag. I am NOT trying to put it into the ‘span’ tag.
Based on your edit, you might check out jQuery’s DOM traversal methods: http://docs.jquery.com/Traversing
Something along these lines (not tested, I don’t claim it’s syntactically correct, just general ideas here)…