I'm having a bit of strange trouble (I'm in datatables), targeting the containing spans of the page numbers. This is the html I'm running.
<span>
<span class="target_me fg-button ui-button ui-state-default ui-state-disabled">1</span>
<span class="target_me fg-button ui-button ui-state-default">2</span>
</span>
But when I put the click event on each number and call
alert($(this).parent().html())
It renders the entire code above, rather than just the inital span. This renders just the page number "2" or "1".
alert($(this).html())
Anyone have any idea why this is happening?
Thanks!