This approach is fragile -- it would break if your markup changed and the span you wanted was no longer the first span in the list element, or the button was no longer the first button. Use of CSS classes to look up these elements would be better.